import type { ReactElement } from 'react' import { Link } from 'react-router-dom' import { createStyles, Theme, makeStyles } from '@material-ui/core/styles' import { OpenInNewSharp } from '@material-ui/icons' import { Divider, List, Drawer, Grid, Link as MUILink } from '@material-ui/core' import { Home, FileText, DollarSign, Settings, Layers, BookOpen } from 'react-feather' import { ROUTES } from '../routes' import SideBarItem from './SideBarItem' import SideBarStatus from './SideBarStatus' import Logo from '../assets/logo.svg' const navBarItems = [ { label: 'Info', path: ROUTES.INFO, icon: Home, }, { label: 'Files', path: ROUTES.FILES, icon: FileText, }, { label: 'Stamps', path: ROUTES.STAMPS, icon: Layers, }, { label: 'Accounting', path: ROUTES.ACCOUNTING, icon: DollarSign, }, { label: 'Settings', path: ROUTES.SETTINGS, icon: Settings, }, ] const drawerWidth = 300 const useStyles = makeStyles((theme: Theme) => createStyles({ root: { flexWrap: 'nowrap', minHeight: '100vh', paddingTop: theme.spacing(8), paddingBottom: theme.spacing(8), }, drawer: { width: drawerWidth, flexShrink: 0, }, drawerPaper: { width: drawerWidth, backgroundColor: '#212121', }, logo: { marginLeft: theme.spacing(8), marginRight: theme.spacing(8), }, icon: { height: theme.spacing(4), }, iconSmall: { height: theme.spacing(2), }, divider: { backgroundColor: '#2c2c2c', marginLeft: theme.spacing(4), marginRight: theme.spacing(4), }, link: { color: '#9f9f9f', textDecoration: 'none', '&:hover': { textDecoration: 'none', // https://github.com/mui-org/material-ui/issues/22543 '@media (hover: none)': { textDecoration: 'none', }, }, }, }), ) export default function SideBar(): ReactElement { const classes = useStyles() return ( swarm {navBarItems.map(p => ( } path={p.path} label={p.label} /> ))} } iconEnd={} label={Docs} /> ) }