title: How to create onSubmit with Material-UI
body: <p>So I'm fairly new to node.js / react / material-ui. I've been following a guide to try setting up a website and have been getting on pretty well. I decided to include material-ui for snazzy components (not part of the guide) and then got stuck because I can't seem to fire custom functions whilst using a themed ui.</p>
  
  <p>With the below code, I can create everything fine if I ditch the 'classes' props. I can add my function and everything works. But I obviously lose all my styling if I do this.</p>
  
  <pre class="lang-js prettyprint-override"><code>const styles = theme =&gt; ({
      // Styling - omitted
  });
  
  const Login = (props) =&gt; {
  
      const {classes} = props;
  
      return(
          &lt;div&gt;
              &lt;Paper className={classes.root}&gt;
                  &lt;form className={classes.container} noValidate autoComplete="off"&gt;
                      &lt;TextField
                          id="email"
                          label="Email"
                          className={classes.textField}
                          InputProps={{
                              className: classes.input
                          }}
                          type="email"
                          name="email"
                          autoComplete="email"
                          margin="normal"
                          variant="outlined"
                          required
                          autoFocus
                      /&gt;
                      &lt;TextField
                          id="outlined"
                          label="Password"
                          className={classes.textField}
                          InputProps={{
                              className: classes.input
                          }}
                          type="password"
                          autoComplete="current-password"
                          margin="normal"
                          variant="outlined"
                          required
                      /&gt;
                      &lt;Typography className={classes.divider} /&gt;
                      &lt;Button
                          type="submit"
                          variant="contained"
                          color="inherit"
                          className={classes.button}
                      &gt;
                          Login
                      &lt;/Button&gt;
                  &lt;/form&gt;
              &lt;/Paper&gt;
          &lt;/div&gt;
      );
  }
  
  Login.propTypes = {
      classes: PropTypes.object.isRequired,
  };
  
  export default withStyles(styles)(Login);
  </code></pre>
  
  <p>I'm trying to combine the styling as well as being able to fire a custom function to submit the form data. Does anyone have any thoughts?</p>