Skip to content

Commit c3c1ccb

Browse files
author
motion
committed
make sure the stories no longer have typescript issue
1 parent 88cdab2 commit c3c1ccb

1 file changed

Lines changed: 20 additions & 17 deletions

File tree

packages/ra-ui-materialui/src/layout/AppBar.stories.tsx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
ListItemText,
99
TextField,
1010
Skeleton,
11+
MenuItemProps,
1112
} from '@mui/material';
1213
import SettingsIcon from '@mui/icons-material/Settings';
1314
import { QueryClientProvider, QueryClient } from 'react-query';
@@ -198,23 +199,25 @@ export const UserMenuCustom = () => (
198199
);
199200

200201
// It's important to pass the ref to allow MUI to manage the keyboard navigation
201-
const SettingsMenuItem = React.forwardRef((props, ref) => {
202-
// We are not using MenuItemLink so we retrieve the onClose function from the UserContext
203-
const { onClose } = useUserMenu();
204-
return (
205-
<MenuItem
206-
onClick={onClose}
207-
ref={ref}
208-
// It's important to pass the props to allow MUI to manage the keyboard navigation
209-
{...props}
210-
>
211-
<ListItemIcon>
212-
<SettingsIcon fontSize="small" />
213-
</ListItemIcon>
214-
<ListItemText>Customize</ListItemText>
215-
</MenuItem>
216-
);
217-
});
202+
const SettingsMenuItem: React.FC<MenuItemProps> = React.forwardRef(
203+
(props, ref) => {
204+
// We are not using MenuItemLink so we retrieve the onClose function from the UserContext
205+
const { onClose } = useUserMenu();
206+
return (
207+
<MenuItem
208+
onClick={onClose}
209+
ref={ref}
210+
// It's important to pass the props to allow MUI to manage the keyboard navigation
211+
{...props}
212+
>
213+
<ListItemIcon>
214+
<SettingsIcon fontSize="small" />
215+
</ListItemIcon>
216+
<ListItemText>Customize</ListItemText>
217+
</MenuItem>
218+
);
219+
}
220+
);
218221

219222
export const UserMenuElements = () => (
220223
<Wrapper>

0 commit comments

Comments
 (0)