Usage
import { Modal } from 'nr1'
Examples
Props
Pass the string of the text content which should better describe the purpose of the modal to be correctly announced by screen readers.
Content to render inside the modal.
Appends class names to the component.
false
If true
, the modal is hidden.
Callback fired when clicking on the Modal's close button.
Callback fired when the Modal finishes the closing animation.
Use this to unmount the Modal component. This ensures that the closing animation works properly.
Callback fired when the Modal starts the closing animation.
Callback fired when the Modal finishes the opening animation.
Callback fired when the Modal starts the opening animation.
Inline style for custom styling.
Adds a data-test-id
attribute. Use it to target the component in unit and
E2E tests.
For a test id to be valid, prefix it with your nerdpack id, followed up by a dot.
For example, my-nerdpack.some-element
.
Note: You might not see data-test-id
attributes as they are removed
from the DOM, to debug them pass a e2e-test
query parameter to the URL.