diff --git a/src/components/common/textLines/TextLines.tsx b/src/components/common/textLines/TextLines.tsx index 475aff1cbf..245950cc73 100644 --- a/src/components/common/textLines/TextLines.tsx +++ b/src/components/common/textLines/TextLines.tsx @@ -1,11 +1,39 @@ -import React, { type FC } from 'react'; +import React, { type FC, type PropsWithChildren } from 'react'; +import classNames from 'classnames'; +import Typography from '@mui/material/Typography'; import Box from '@mui/material/Box'; import useTextLines from './useTextLines'; -import TextWrapper from './TextWrapper'; import type { ItemDto } from 'types/base/models/item-dto'; import type { TextLine, TextLineOpts } from './types'; +interface TextWrapperProps { + isHeading?: boolean; + isLargeStyle?: boolean; + className?: string; +} + +const TextWrapper: FC> = ({ + isHeading, + isLargeStyle, + className, + children +}) => { + if (isHeading) { + return ( + + {children} + + ); + } else { + return ( + + {children} + + ); + } +}; + interface TextLinesProps { item: ItemDto; textLineOpts?: TextLineOpts; @@ -27,11 +55,11 @@ const TextLines: FC = ({ return ( - {text.title} + {text.title} ); }; diff --git a/src/components/common/textLines/TextWrapper.tsx b/src/components/common/textLines/TextWrapper.tsx deleted file mode 100644 index fead0bff6b..0000000000 --- a/src/components/common/textLines/TextWrapper.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React, { type FC, type PropsWithChildren } from 'react'; -import classNames from 'classnames'; -import Typography from '@mui/material/Typography'; -import Box from '@mui/material/Box'; - -interface TextWrapperProps { - index?: number; - isLargeStyle?: boolean; - className?: string; -} - -const TextWrapper: FC> = ({ - index, - isLargeStyle, - className, - children -}) => { - if (index === 0) { - return ( - - {children} - - ); - } else { - return ( - - {children} - - ); - } -}; - -export default TextWrapper;