text: /* eslint-disable flowtype/require-valid-file-annotation */
  
  import React from 'react';
  import Button from '@material-next/core/Button';
  import Menu, { MenuItem } from '@material-next/core/Menu';
  
  class SimpleMenu extends React.Component {
    state = {
      anchorEl: null,
      open: false,
    };
  
    handleClick = event => {
      this.setState({ open: true, anchorEl: event.currentTarget });
    };
  
    handleRequestClose = () => {
      this.setState({ open: false });
    };
  
    render() {
      return (
        <div>
          <Button
            aria-owns={this.state.open ? 'simple-menu' : null}
            aria-haspopup="true"
            onClick={this.handleClick}
          >
            Open Menu
          </Button>
          <Menu
            id="simple-menu"
            anchorEl={this.state.anchorEl}
            open={this.state.open}
            onRequestClose={this.handleRequestClose}
          >
            <MenuItem onClick={this.handleRequestClose}>Profile</MenuItem>
            <MenuItem onClick={this.handleRequestClose}>My account</MenuItem>
            <MenuItem onClick={this.handleRequestClose}>Logout</MenuItem>
          </Menu>
        </div>
      );
    }
  }
  
  export default SimpleMenu;
  