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

View File

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