import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import CloseIcon from '@material-ui/icons/Close'; import { Typography, Button, Snackbar, IconButton, Grid } from '@material-ui/core'; const styles = theme => ({ close: { width: theme.spacing(4) }, divider: { margin: `${theme.spacing(3)}px 0`, }, button: { margin: theme.spacing(1) } }); class SimpleNotif extends React.Component { state = { open: false, open2: false, vertical: 'bottom', horizontal: 'left', }; handleClick = () => { this.setState({ open: true }); }; handleClose = (event, reason) => { if (reason === 'clickaway') { return; } this.setState({ open: false }); }; handleClick2 = state => () => { this.setState({ open2: true, ...state }); }; handleClose2 = () => { this.setState({ open2: false }); }; render() { const { classes } = this.props; const { vertical, horizontal, open2 } = this.state; return ( Simple Notification
Note archived} action={[ , , ]} />
Positioning
I love snacks} />
); } } SimpleNotif.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(SimpleNotif);