all repos — caroster @ be8f93ea0966f0bc0587c2c127ee1ba15594a049

[Octree] Group carpool to your event https://caroster.io

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    <Button className={classes.drawerMenuButton} onClick={onClick}>
17      <Box className={classes.icon} color="inherit">
18        {Icon}
19      </Box>
20      <Typography color="inherit" className={classes.drawerText}>
21        {title}
22      </Typography>
23    </Button>
24  );
25};
26
27export default DrawerMenuItem;