Skip to content

Commit

Permalink
[F][C][SideBar] add paper to menu items
Browse files Browse the repository at this point in the history
  • Loading branch information
Fibii committed Oct 27, 2020
1 parent a6028df commit 8376ba2
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions frontend/src/components/Header/Sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import AddBoxIcon from '@material-ui/icons/AddBox'
import ExitToAppIcon from '@material-ui/icons/ExitToApp'
import React, { useContext } from 'react'
import { grey, lightBlue } from '@material-ui/core/colors'
import Paper from '@material-ui/core/Paper'
import UserContext from '../UserContext/UserContext'


const drawerWidth = 240

const useStyles = makeStyles((theme) => ({
Expand Down Expand Up @@ -45,6 +45,11 @@ const useStyles = makeStyles((theme) => ({
color: lightBlue[800],
marginRight: 16,
},
itemPaper: {
marginTop: 4,
marginLeft: 4,
marginRight: 4,
},

}))

Expand Down Expand Up @@ -83,21 +88,27 @@ const Sidebar = ({ state, dispatch }) => {
<Divider />
<List>
<Link to="/" className={classes.link}>
<ListItem button key="home" data-testid="home-button">
<HomeIcon className={classes.icons} />
<ListItemText primary="Home" />
</ListItem>
<Paper className={classes.itemPaper}>
<ListItem button key="home" data-testid="home-button">
<HomeIcon className={classes.icons} />
<ListItemText primary="Home" />
</ListItem>
</Paper>
</Link>
<Link to="/question/new" className={classes.link} data-testid="newQuestion-button">
<ListItem button key="newQuestion">
<AddBoxIcon className={classes.icons} />
<ListItemText primary="New Question" />
</ListItem>
<Paper className={classes.itemPaper}>
<ListItem button key="newQuestion">
<AddBoxIcon className={classes.icons} />
<ListItemText primary="New Question" />
</ListItem>
</Paper>
</Link>
<ListItem button key="logout" onClick={() => handleLogout()} data-testid="logoutDrawer-button">
<ExitToAppIcon className={classes.icons} />
<ListItemText primary="Logout" />
</ListItem>
<Paper onClick={() => handleLogout()} className={classes.itemPaper}>
<ListItem button key="logout" data-testid="logoutDrawer-button">
<ExitToAppIcon className={classes.icons} />
<ListItemText primary="Logout" />
</ListItem>
</Paper>
</List>
</Drawer>
</>
Expand Down

0 comments on commit 8376ba2

Please sign in to comment.