import React from "react" import PropTypes from "prop-types" import { Modal } from "react-bootstrap" export const FormModal = ({ show, setShow, title, icon, handleSubmit, children, }) => { const submit = function(e) { if (e) { e.preventDefault(); } handleSubmit(); }; return ( setShow(false)}> {title}
submit(ev)}> {children}
Apply
setShow(false)}>Close
) } FormModal.propTypes = { show: PropTypes.bool, setShow: PropTypes.func, icon: PropTypes.string, title: PropTypes.string, handleSubmit: PropTypes.func, children: PropTypes.oneOf( PropTypes.object, PropTypes.array, ), };