content: import React from 'react';
  import Snackbar from 'material-ui/Snackbar';
  import TextField from 'material-ui/TextField';
  import RaisedButton from 'material-ui/RaisedButton';
  
  export default class SnackbarExampleSimple extends React.Component {
  
    constructor(props) {
      super(props);
      this.state = {
        autoHideDuration: 4000,
        message: 'Event added to your calendar',
        open: false,
      };
    }
  
    handleTouchTap = () => {
      this.setState({
        open: true,
      });
    };
  
    handleActionTouchTap = () => {
      this.setState({
        open: false,
      });
      alert('Event removed from your calendar.');
    };
  
    handleChangeDuration = (event) => {
      const value = event.target.value;
      this.setState({
        autoHideDuration: value.length > 0 ? parseInt(value) : 0,
      });
    };
  
    handleRequestClose = () => {
      this.setState({
        open: false,
      });
    };
  
    render() {
      return (
        <div>
          <RaisedButton
            onTouchTap={this.handleTouchTap}
            label="Add to my calendar"
          />
          <br />
          <TextField
            floatingLabelText="Auto Hide Duration in ms"
            value={this.state.autoHideDuration}
            onChange={this.handleChangeDuration}
          />
          <Snackbar
            open={this.state.open}
            message={this.state.message}
            action="undo"
            autoHideDuration={this.state.autoHideDuration}
            onActionTouchTap={this.handleActionTouchTap}
            onRequestClose={this.handleRequestClose}
          />
        </div>
      );
    }
  }
  