diff --git a/client/src/views/header/index.js b/client/src/views/header/index.js index d96f17c85..d594153c0 100644 --- a/client/src/views/header/index.js +++ b/client/src/views/header/index.js @@ -2,6 +2,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import { withStyles } from '@material-ui/core/styles' +import withWidth from '@material-ui/core/withWidth' import AppBar from '@material-ui/core/AppBar' import Toolbar from '@material-ui/core/Toolbar' import Typography from '@material-ui/core/Typography' @@ -11,6 +12,7 @@ import Button from '@material-ui/core/Button' // icons import HomeIcon from '@material-ui/icons/Home' import ExitIcon from '@material-ui/icons/ExitToApp' +import MenuIcon from '@material-ui/icons/Menu' import { Link } from 'react-router-dom' @@ -72,15 +74,23 @@ const styles = theme => ({ }, dropdownButtons: { display: 'block' + }, + mobileMenu: { + color: theme.palette.common.white, + boxShadow: 'none', + border: `1px solid ${theme.palette.common.white}`, + background: 'none' } }) class Header extends Component { constructor (props) { super(props) + this.toggleMenu = this.toggleMenu.bind(this) this.state = { user: null, - open: null + open: null, + mobileOpen: false } } @@ -90,7 +100,7 @@ class Header extends Component { } render () { - let { classes, auth } = this.props + let { classes, auth, width } = this.props let { open } = this.state let user = JSON.parse(this.state.user) @@ -117,6 +127,34 @@ class Header extends Component { ) }) + const mobileMenusButton = ( + + ) + + const mobileMenus = allMenus.map((menu, index) => { + return ( +