Guest User

Untitled

a guest
Feb 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. /**
  2. Form actions component
  3. **/
  4.  
  5. import { withStyles } from "material-ui/styles";
  6. import { formStyles } from "./styles";
  7. import React from "react";
  8. import PropTypes from "prop-types";
  9. import Button from "./Button";
  10.  
  11. const { array } = PropTypes;
  12.  
  13. const FormActions = (props) => {
  14. const { classes, handleSubmit, handleClose, actions } = props;
  15.  
  16. return (
  17. <section className={classes.actions}>
  18. {actions.map((action, key) => {
  19. return (
  20. <Button
  21. className={classes.actionButton}
  22. key={key}
  23. onClick={(e) => console.log(e)}
  24. color="primary"
  25. >
  26. {action}
  27. </Button>
  28. );
  29. })}
  30. </section>
  31. );
  32. };
  33.  
  34. FormActions.propTypes = {
  35. actions: array.isRequired
  36. };
  37.  
  38. export default withStyles(formStyles)(FormActions);
Add Comment
Please, Sign In to add comment