|
1 | | -import { useCallback } from 'react'; |
| 1 | +import { FunctionComponent, useCallback } from 'react'; |
2 | 2 | import clsx from 'clsx'; |
3 | 3 | import Divider from '@mui/material/Divider'; |
4 | 4 | import Drawer, { DrawerProps } from '@mui/material/Drawer'; |
@@ -42,19 +42,19 @@ const useStyles = makeStyles((theme: Theme) => ({ |
42 | 42 | }, |
43 | 43 | })); |
44 | 44 |
|
| 45 | +interface Props extends Pick<DrawerProps, 'anchor' | 'className' | 'open' | 'variant' | 'onClose'> { |
| 46 | + items: Array<LinkToPage>; |
| 47 | +} |
45 | 48 | /** |
46 | 49 | * Renders SideBar with Menu and User details |
47 | 50 | * Actually for Authenticated users only, rendered in "Private Layout" |
48 | 51 | * @param {string} [prop.anchor] - 'left' or 'right' |
49 | 52 | * @param {string} [prop.className] - optional className for <div> tag |
50 | 53 | * @param {boolean} props.open - the Drawer is visible when true |
51 | 54 | * @param {string} props.variant - variant of the Drawer, one of 'permanent', 'persistent', 'temporary' |
52 | | - * @param {func} [props.onClose] - called when the Drawer is closing |
| 55 | + * @param {function} [props.onClose] - called when the Drawer is closing |
53 | 56 | */ |
54 | | -interface Props extends Pick<DrawerProps, 'anchor' | 'className' | 'open' | 'variant' | 'onClose'> { |
55 | | - items: Array<LinkToPage>; |
56 | | -} |
57 | | -const SideBar: React.FC<Props> = ({ anchor, className, open, variant, items, onClose, ...restOfProps }) => { |
| 57 | +const SideBar: FunctionComponent<Props> = ({ anchor, className, open, variant, items, onClose, ...restOfProps }) => { |
58 | 58 | const [state, dispatch] = useAppStore(); |
59 | 59 | const classes = useStyles(); |
60 | 60 |
|
|
0 commit comments