Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Form actions component
- **/
- import { withStyles } from "material-ui/styles";
- import { formStyles } from "./styles";
- import React from "react";
- import PropTypes from "prop-types";
- import Button from "./Button";
- const { array } = PropTypes;
- const FormActions = (props) => {
- const { classes, handleSubmit, handleClose, actions } = props;
- return (
- <section className={classes.actions}>
- {actions.map((action, key) => {
- return (
- <Button
- className={classes.actionButton}
- key={key}
- onClick={(e) => console.log(e)}
- color="primary"
- >
- {action}
- </Button>
- );
- })}
- </section>
- );
- };
- FormActions.propTypes = {
- actions: array.isRequired
- };
- export default withStyles(formStyles)(FormActions);
Add Comment
Please, Sign In to add comment