text: import React, { useState, useEffect } from 'react';
  import Button from '@material-ui/core/Button';
  import TextField from '@material-ui/core/TextField';
  import Dialog from '@material-ui/core/Dialog';
  import DialogActions from '@material-ui/core/DialogActions';
  import DialogContent from '@material-ui/core/DialogContent';
  import DialogContentText from '@material-ui/core/DialogContentText';
  import DialogTitle from '@material-ui/core/DialogTitle';
  import Fab from '@material-ui/core/Fab';
  import AddIcon from '@material-ui/icons/Add';
  import { makeStyles } from '@material-ui/styles';
  import App from '../../containers/App';
  
  const useStyles = makeStyles(theme => ({
    fab: {
      position: 'fixed',
      bottom: theme.spacing(2),
      right: theme.spacing(2)
    }
  }));
  
  const NewItem = props => {
    const { className, ...rest } = props;
    const classes = useStyles();
    const [open, setOpen] = React.useState(false);
  
    const handleaddNewMenu = event => {
      console.log('handleaddNewMenu', event);
      props.history.push(Routes.NEW_MENU);
    };
  
    const handleClickOpen = () => {
      setOpen(true);
    };
  
    const handleClose = () => {
      setOpen(false);
    };
    return (
      <App>
        <Fab
          color="primary"
          aria-label="add"
          className={classes.fab}
          onClick={handleClickOpen}
        >
          <AddIcon />
        </Fab>
        <Dialog
          open={open}
          onClose={handleClose}
          aria-labelledby="form-dialog-title"
          maxWidth="sm"
          fullWidth
        >
          <DialogTitle id="form-dialog-title">Add New Item</DialogTitle>
          <DialogContent>
            <DialogContentText>Add New Item to the Inventory</DialogContentText>
            <TextField
              autoFocus
              margin="dense"
              id="itemName"
              label="Item Name"
              type="text"
              fullWidth
            />
          </DialogContent>
          <DialogActions>
            <Button onClick={handleClose} color="primary">
              Cancel
            </Button>
            <Button onClick={handleClose} color="primary">
              Add
            </Button>
          </DialogActions>
        </Dialog>
      </App>
    );
  };
  
  export default NewItem;
  