diff --git a/web/modals/modal.react.js b/web/modals/modal.react.js --- a/web/modals/modal.react.js +++ b/web/modals/modal.react.js @@ -4,6 +4,7 @@ import invariant from 'invariant'; import * as React from 'react'; +import { ModalContext } from './modal-provider.react'; import css from './modal.css'; export type ModalSize = 'small' | 'large'; @@ -85,4 +86,21 @@ }; } -export default Modal; +const ConnectedModal = (props: Props): React.Node => { + const { name, size, children, fixedHeight } = props; + const modalContext = React.useContext(ModalContext); + invariant(modalContext, 'modalContext should be set'); + + return ( + + {children} + + ); +}; + +export default ConnectedModal;