import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import { Typography, Modal, Button, Grid } from '@material-ui/core'; function getModalStyle() { return { top: '50%', left: '50%', transform: 'translate(-50%, -50%)', }; } const styles = theme => ({ paper: { position: 'absolute', width: theme.spacing(50), backgroundColor: theme.palette.background.paper, boxShadow: theme.shadows[5], padding: theme.spacing(4), }, }); class ModalDemo extends React.Component { state = { open: false, }; handleOpen = () => { this.setState({ open: true }); }; handleClose = () => { this.setState({ open: false }); }; render() { const { classes } = this.props; return ( Click to get the full Modal experience!
Text in a modal Duis mollis, est non commodo luctus, nisi erat porttitor ligula.
); } } ModalDemo.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(ModalDemo);