|
|
|
@ -2,6 +2,7 @@ import { Drawer, List, ListItem } from '@material-ui/core'; |
|
|
|
|
import { makeStyles, createStyles } from '@material-ui/core/styles'; |
|
|
|
|
import { Dispatch, SetStateAction } from 'react'; |
|
|
|
|
import { BodyText } from './Text'; |
|
|
|
|
import { ICONS, ICON_SIZE } from '../lib/consts/ICONS'; |
|
|
|
|
|
|
|
|
|
interface DrawerProps { |
|
|
|
|
open: boolean; |
|
|
|
@ -11,7 +12,9 @@ interface DrawerProps { |
|
|
|
|
const useStyles = makeStyles(() => |
|
|
|
|
createStyles({ |
|
|
|
|
list: { |
|
|
|
|
width: 'auto', |
|
|
|
|
width: '15vw', |
|
|
|
|
backdropFilter: 'blur(10px)', |
|
|
|
|
opacity: 0.7, |
|
|
|
|
}, |
|
|
|
|
}), |
|
|
|
|
); |
|
|
|
@ -21,11 +24,21 @@ const AnvilDrawer = ({ open, setOpen }: DrawerProps): JSX.Element => { |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<Drawer anchor="left" open={open} onClose={() => setOpen(!open)}> |
|
|
|
|
<div role="presentation" className={classes.list}> |
|
|
|
|
<List> |
|
|
|
|
<ListItem button> |
|
|
|
|
<BodyText text="Button" /> |
|
|
|
|
</ListItem> |
|
|
|
|
<div role="presentation"> |
|
|
|
|
<List className={classes.list}> |
|
|
|
|
{ICONS.map( |
|
|
|
|
(icon): JSX.Element => ( |
|
|
|
|
<ListItem button key={icon.image}> |
|
|
|
|
<img |
|
|
|
|
alt="" |
|
|
|
|
key="icon" |
|
|
|
|
src={icon.image} // eslint-disable-next-line react/jsx-props-no-spreading
|
|
|
|
|
{...ICON_SIZE} |
|
|
|
|
/> |
|
|
|
|
<BodyText text={icon.text} /> |
|
|
|
|
</ListItem> |
|
|
|
|
), |
|
|
|
|
)} |
|
|
|
|
</List> |
|
|
|
|
</div> |
|
|
|
|
</Drawer> |
|
|
|
|