withModal
HOC that provides the modal
prop to a wrapped Class component.
Note: Prefer useModal() Hooks if you're using a functional component.
The modal
prop injected bywithodal()
is covered in ModalProp.
API reference
Using withModal
will give you access to:
this.props.modal
currentModal
: name of the current 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