Skip to content

Commit

Permalink
fix(ToggleButtonGroup): add forwardRef ToggleButtonGroup component
Browse files Browse the repository at this point in the history
Signed-off-by: seniorliketocode <[email protected]>
  • Loading branch information
capricorn-32 committed Dec 25, 2024
1 parent f2f9a3d commit 72bf79d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/base/ToggleButtonGroup/ToggleButtonGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import {
ToggleButtonGroup as MuiToggleButtonGroup,
type ToggleButtonGroupProps as MuiToggleButtonGroupProps
} from '@mui/material';
import React from 'react';

export function ToggleButtonGroup(props: MuiToggleButtonGroupProps): JSX.Element {
return <MuiToggleButtonGroup {...props} />;
}
const ToggleButtonGroup = React.forwardRef<HTMLDivElement, MuiToggleButtonGroupProps>(
(props, ref) => {
return <MuiToggleButtonGroup {...props} ref={ref} />;
}
);

export default ToggleButtonGroup;

0 comments on commit 72bf79d

Please sign in to comment.