Skip to content

Commit 2fb5373

Browse files
committed
fix(Skeleton): add forwardRef Skeleton component
Signed-off-by: seniorliketocode <abhishek234543@gmail.com>
1 parent 98ce6b2 commit 2fb5373

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/base/Skeleton/Skeleton.tsx

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

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

78
export default Skeleton;

0 commit comments

Comments
 (0)