Components

Modal

<Modal id modalContent isOpenStateInParent onClose modalClassName modalBackgroundClassName addCloseButton closeButtonClassName closeButtonText />

Constructor

Modal component that can be opened and closed by clicking outside of the modal or the close button.

PropTypes:
Name Type Required Description Default
id string Yes The id of the modal.
modalContent node Yes The content of the modal.
isOpenStateInParent bool Yes A boolean that determines whether or not the modal is open.
onClose func Yes A function that is called when the modal is closed.
modalClassName string No The class name of the modal. "modal"
modalBackgroundClassName string No The class name of the modal background. "modal-background"
addCloseButton bool No Determines whether or not to add a close button to the modal. true
closeButtonClassName string No The class name of the close button. "close-modal"
closeButtonText node No The text of the close button. "Close"

View Source components/Modal/index.jsx, line 17

  • The modal component.
React.Component