Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions apps/web/content/docs/components/modal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,16 @@ Using a `openModal` and `setOpenModal` state for the main React component should

<Example name="modal.root" />

## Backdrop dismissible
## Dismissible modal

To enable the modal to be dismissed when clicking outside of the component (ie. the backdrop) then you can pass the `dismissible` prop to the `<Modal>` component from React.
To enable the close (X) button and allow the modal to be dismissed by clicking the backdrop or pressing the Escape key, pass the `dismissible` prop to the `<Modal>` component.

When `dismissible` is set to `true`, the close button will appear in the header and the `onClose` callback will be triggered when the user tries to close the modal.

<Example name="modal.dismissible" />



## Pop-up modal

Use this example by passing the `popup` prop from React to the modal component to show a dialog to the user asking for a decision such as when confirming an item deletion from the database.
Expand Down
Loading