withModal
HOC that provides the modal
prop to a wrapped Class component. The modal
prop injected bywithodal()
is covered in ModalProp
.
Note: PreferuseModal()
Hooks if you're using a functional component.
API reference
Using withModal()
will give you access to:
this.props.modal
currentModal
: name of the currently displayed modal if there's oneopenModal
: open a specific modalcloseModal
: close a modalcloseModals
: close every instance of a given modalcloseAllModals
: close all open modals
as seen in ModalProp
.
Last updated