all repos — caroster @ d0d47704e427face6c4cea5a2e1326c3679f6f5d

[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    <Box className={classes.drawerMenuItem}>
17      <Button className={classes.button} color="inherit" onClick={onClick}>
18        {Icon}
19      </Button>
20      <Typography
21        variant="overline"
22        color="inherit"
23        className={classes.drawerText}
24      >
25        {title}
26      </Typography>
27    </Box>
28  );
29};
30
31export default DrawerMenuItem;