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