Skip to content

Commit e3b9b87

Browse files
committed
fix(Paper): add forwardRef Paper component
Signed-off-by: seniorliketocode <abhishek234543@gmail.com>
1 parent 01c575f commit e3b9b87

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/base/ListItemIcon/ListItemIcon.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ const ListItemIcon = React.forwardRef<HTMLDivElement, MuiListItemIconProps>((pro
88
return <MuiListItemIcon {...props} ref={ref} />;
99
});
1010

11-
export default ListItemIcon;
11+
export { ListItemIcon };

src/base/Paper/Paper.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { Paper as MuiPaper, type PaperProps as MuiPaperProps } from '@mui/material';
2+
import React from 'react';
23

3-
export function Paper(props: MuiPaperProps): JSX.Element {
4-
return <MuiPaper {...props}>{props.children}</MuiPaper>;
5-
}
4+
const Paper = React.forwardRef<HTMLDivElement, MuiPaperProps>((props, ref) => {
5+
return <MuiPaper {...props} ref={ref} />;
6+
});
67

78
export default Paper;

0 commit comments

Comments
 (0)