Skip to content

Commit 95fb0c6

Browse files
committed
fix(Typography): add forwardRef Typography component
Signed-off-by: seniorliketocode <[email protected]>
1 parent 5315216 commit 95fb0c6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/base/Typography/Typography.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import {
22
Typography as MuiTypography,
33
type TypographyProps as MuiTypographyProps
44
} from '@mui/material';
5+
import React from 'react';
56

6-
export function Typography(props: MuiTypographyProps): JSX.Element {
7-
return <MuiTypography {...props} />;
8-
}
7+
const Typography = React.forwardRef<HTMLDivElement, MuiTypographyProps>((props, ref) => {
8+
return <MuiTypography {...props} ref={ref} />;
9+
});
910

1011
export default Typography;

0 commit comments

Comments
 (0)