diff --git a/src/components/general/Typography/Typography.tsx b/src/components/general/Typography/Typography.tsx index bf5ea299b..70d69edc4 100644 --- a/src/components/general/Typography/Typography.tsx +++ b/src/components/general/Typography/Typography.tsx @@ -1,4 +1,4 @@ -import { Typography as AntTypography } from 'antd' +import { Typography as AntTypography, type TypographyProps as AntTypographyProps } from 'antd' import { ConfigProvider } from 'src/components' import { type ReactNode } from 'react' import { type TextProps as AntTextProps } from 'antd/es/typography/Text' @@ -6,44 +6,55 @@ import { type TitleProps as AntTitleProps } from 'antd/es/typography/Title' import { type LinkProps as AntLinkProps } from 'antd/es/typography/Link' import { type ParagraphProps as AntParagraphProps } from 'antd/es/typography/Paragraph' -export const Typography = AntTypography +export interface ITypographyProps extends AntTypographyProps { + children: ReactNode +} + +export const Typography = (props: ITypographyProps) => ( + + {props.children} + +) export interface ITextProps extends AntTextProps { - children: ReactNode } -export const Text = (props: ITextProps) => ( +const Text = (props: ITextProps) => ( {props.children} ) +Typography.Text = Text -export interface ITitleProps extends AntTitleProps { +interface ITitleProps extends AntTitleProps { children: ReactNode } -export const Title = (props: ITitleProps) => ( +const Title = (props: ITitleProps) => ( {props.children} ) +Typography.Title = Title export interface ILinkProps extends AntLinkProps { children: ReactNode } -export const Link = (props: ILinkProps) => ( +const Link = (props: ILinkProps) => ( {props.children} ) +Typography.Link = Link export interface IParagraphProps extends AntParagraphProps { children: ReactNode } -export const Paragraph = (props: IParagraphProps) => ( +const Paragraph = (props: IParagraphProps) => ( {props.children} ) +Typography.Paragraph = Paragraph