Fix OHIFModal proptypes

This commit is contained in:
Igor 2019-11-14 17:57:44 -03:00
parent e895bfb1aa
commit b6119f8e29
2 changed files with 11 additions and 4 deletions

View File

@ -35,7 +35,6 @@ const OHIFModal = ({
<ReactBootstrapModal.Body>{children}</ReactBootstrapModal.Body> <ReactBootstrapModal.Body>{children}</ReactBootstrapModal.Body>
{Footer && ( {Footer && (
<ReactBootstrapModal.Footer> <ReactBootstrapModal.Footer>
{' '}
<Footer hide={onHide} /> <Footer hide={onHide} />
</ReactBootstrapModal.Footer> </ReactBootstrapModal.Footer>
)} )}
@ -50,8 +49,16 @@ OHIFModal.propTypes = {
show: PropTypes.bool, show: PropTypes.bool,
title: PropTypes.string, title: PropTypes.string,
onHide: PropTypes.func, onHide: PropTypes.func,
footer: PropTypes.node, footer: PropTypes.oneOfType([
header: PropTypes.node, PropTypes.arrayOf(PropTypes.node),
PropTypes.node,
PropTypes.func,
]),
header: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node,
PropTypes.func,
]),
children: PropTypes.oneOfType([ children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node), PropTypes.arrayOf(PropTypes.node),
PropTypes.node, PropTypes.node,

View File

@ -74,9 +74,9 @@ const ModalProvider = ({ children, modal: Modal, service }) => {
show={options.show} show={options.show}
title={options.title} title={options.title}
closeButton={options.closeButton} closeButton={options.closeButton}
onHide={hide}
footer={options.footer} footer={options.footer}
header={options.header} header={options.header}
onHide={hide}
> >
<Component {...options} show={show} hide={hide} /> <Component {...options} show={show} hide={hide} />
</Modal> </Modal>