File tree Expand file tree Collapse file tree
packages/ui/src/components/RichText Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,24 +20,27 @@ const LinkComp: FC<Readonly<LinkProps & { children: ReactNode; className?: strin
2020
2121const TypographyComp : FC < Readonly < TypographyProps & { children : ReactNode ; tag : string } > > = ( {
2222 children,
23+ tag = 'p' ,
24+ variant,
2325 ...props
2426} ) => {
25- const Tag = props . tag || 'p' ;
27+ const Tag = tag || 'p' ;
2628 return (
27- < Typography variant = { props . variant } asChild >
29+ < Typography variant = { variant } asChild >
2830 < Tag { ...props } > { children } </ Tag >
2931 </ Typography >
3032 ) ;
3133} ;
3234
3335const TdComp : FC < Readonly < TypographyProps & { children : ReactNode } > > = ( {
3436 children,
37+ 'data-highlighted' : isHighlighted ,
3538 ...props
3639} : {
3740 children : ReactNode ;
3841 'data-highlighted' ?: boolean ;
3942} ) => {
40- const variant = props [ 'data-highlighted' ] ? 'tableCellHighlighted' : 'tableCell' ;
43+ const variant = isHighlighted ? 'tableCellHighlighted' : 'tableCell' ;
4144 return (
4245 < TypographyComp variant = { variant } tag = "td" { ...props } >
4346 { children }
You can’t perform that action at this time.
0 commit comments