Skip to content

Commit ceee657

Browse files
committed
fix(Button): add forwardRef Button component
Signed-off-by: seniorliketocode <abhishek234543@gmail.com>
1 parent 43f0955 commit ceee657

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/base/Switch/Switch.tsx

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

3-
export function Switch(props: MuiSwitchProps): JSX.Element {
4-
return <MuiSwitch {...props} />;
5-
}
4+
const Switch = React.forwardRef<HTMLButtonElement, MuiSwitchProps>((props, ref) => {
5+
return <MuiSwitch {...props} ref={ref} />;
6+
});
67

78
export default Switch;

0 commit comments

Comments
 (0)