import { registerComponent } from 'meteor/vulcan:lib'; import React from 'react'; import PropTypes from 'prop-types'; import Modal from 'react-bootstrap/lib/Modal' const BootstrapModal = ({ children, size, show, onHide, title, showCloseButton, footerContent, ...rest }) => { const header = title ? {title} : showCloseButton ? : null; const footer = footerContent ? {footerContent} : null; return ( {header} {children} {footer} ); }; BootstrapModal.propTypes = { size: PropTypes.string, show: PropTypes.bool, showCloseButton: PropTypes.bool, onHide: PropTypes.func, title: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), footerContent: PropTypes.oneOfType([PropTypes.string, PropTypes.element]), } BootstrapModal.defaultProps = { size: 'large', show: false, showCloseButton: true, } registerComponent('Modal', BootstrapModal);