UNPKG

@blueeast/bluerain-plugin-material-ui

Version:

Adds [Material UI](http://www.material-ui.com/#/) theme Provider to BlueRain. Components of material-ui have been developed using a common interface. [https://blueeast.gitbook.io/bluerain-plugin-material-ui](https://blueeast.gitbook.io/bluerain-plugin-mat

80 lines 2.71 kB
"use strict"; // import React from 'react'; // // import PropTypes from 'prop-types'; // import Button from '@material-ui/core/Button'; // import ClickAwayListener from '@material-ui/core/ClickAwayListener'; // import Grow from '@material-ui/core/Grow'; // import Paper from '@material-ui/core/Paper'; // import Popper from '@material-ui/core/Popper'; // import { MenuList, MenuItem } from '../index'; // // import { withStyles } from '@material-ui/core/styles'; // const styles = (theme: any) => ({ // root: { // display: 'flex', // }, // paper: { // marginRight: theme.spacing.unit * 2, // }, // }); // class MenuListComposition extends React.Component<any, any> { // state = { // open: false, // }; // handleToggle = () => { // this.setState({ open: !this.state.open }); // } // handleClose = (event: any) => { // // if (this.state.anchorEl.contains(event.target)) { // return; // // } // // this.setState({ open: false }); // } // render() { // const { classes } = this.props; // const { open } = this.state; // return ( // <div > // <Paper > // <MenuList> // <MenuItem>Profile</MenuItem> // <MenuItem>My account</MenuItem> // <MenuItem>Logout</MenuItem> // </MenuList> // </Paper> // <div> // <Button // buttonRef={node => { // // this.anchorEl = node; // }} // // aria-owns={open ? 'menu-list-grow' : null} // aria-haspopup="true" // onClick={this.handleToggle} // > // Toggle Menu Grow // </Button> // <Popper open={open} transition disablePortal> // {({ TransitionProps, placement }) => ( // <Grow // {...TransitionProps} // // id="menu-list-grow" // style={{ transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' }} // > // <Paper> // <ClickAwayListener onClickAway={this.handleClose}> // <MenuList> // <MenuItem onClick={this.handleClose}>Profile</MenuItem> // <MenuItem onClick={this.handleClose}>My account</MenuItem> // <MenuItem onClick={this.handleClose}>Logout</MenuItem> // </MenuList> // </ClickAwayListener> // </Paper> // </Grow> // )} // </Popper> // </div> // </div> // ); // } // } // export default MenuListComposition; //# sourceMappingURL=MenuTest1.component.js.map