frontend/containers/DrawerMenu/DrawerMenuItem.tsx (view raw)
1import Typography from '@material-ui/core/Typography';
2import Button from '@material-ui/core/Button';
3import Box from '@material-ui/core/Box';
4import useStyles from './styles';
5
6interface Props {
7 Icon: JSX.Element;
8 title: string;
9 onClick: () => void;
10 active: boolean;
11}
12
13const DrawerMenuItem = ({Icon, title, onClick, active}: Props) => {
14 const classes = useStyles({active});
15 return (
16 <Box className={classes.drawerMenuItem}>
17 <Button className={classes.button} color="inherit" onClick={onClick}>
18 {Icon}
19 </Button>
20 <Typography
21 color="inherit"
22 className={classes.drawerText}
23 >
24 {title}
25 </Typography>
26 </Box>
27 );
28};
29
30export default DrawerMenuItem;