) => (
{title && (
-
+
{title}
)}
diff --git a/src/components/Text/index.tsx b/src/components/Text/index.tsx
index 853e5f00..95e52369 100644
--- a/src/components/Text/index.tsx
+++ b/src/components/Text/index.tsx
@@ -1,4 +1,4 @@
-import React, { CSSProperties, ElementType, ReactNode } from "react";
+import React, { CSSProperties,ComponentProps, ElementType, ReactNode } from "react";
import clsx from "clsx";
import "./Text.scss";
@@ -29,7 +29,7 @@ type TGenericSizes =
| "xl"
| "xs";
-export interface TextProps {
+export interface TextProps extends ComponentProps {
align?: CSSProperties["textAlign"];
as?: ElementType;
children: ReactNode;
@@ -51,6 +51,7 @@ export const Text = ({
size = "md",
weight = "normal",
className,
+ ...rest
}: TextProps) => {
const textClassNames = clsx(
"deriv-text",
@@ -65,5 +66,5 @@ export const Text = ({
const Tag = as;
- return {children};
+ return {children};
};