import React from 'react'; import Button from '@material-ui/core/Button'; import Menu from '@material-ui/core/Menu'; import MenuItem from '@material-ui/core/MenuItem'; import Grow from '@material-ui/core/Grow'; import Fade from '@material-ui/core/Fade'; import Zoom from '@material-ui/core/Zoom'; import Grid from '@material-ui/core/Grid'; class MenuTransition extends React.Component { state = { anchorFade: null, anchorGrow: null, anchorCollapse: null, anchorZoom: null, }; handleClick = (event, type) => { this.setState({ [type]: event.currentTarget }); }; handleClose = type => { this.setState({ [type]: null }); }; handleToggle = type => { // eslint-disable-next-line this.setState({ [type]: !this.state[type] }); }; render() { const { anchorFade, anchorGrow, anchorZoom } = this.state; return ( this.handleClose('anchorFade')} TransitionComponent={Fade} > this.handleClose('anchorFade')}>Profile this.handleClose('anchorFade')}>My account this.handleClose('anchorFade')}>Logout this.handleClose('anchorGrow')} TransitionComponent={Grow} > this.handleClose('anchorGrow')}>Profile this.handleClose('anchorGrow')}>My account this.handleClose('anchorGrow')}>Logout
this.handleClose('anchorZoom')} TransitionComponent={Zoom} > this.handleClose('anchorZoom')}>Profile this.handleClose('anchorZoom')}>My account this.handleClose('anchorZoom')}>Logout
); } } export default MenuTransition;