Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
with simple content
You can pass custom trigger component to the modal. Be sure you forwarded ref to the trigger component to make it work.
You can pass custom width to the modal.
You can pass custom footer to the modal.
Nested modals will close respectively on escape key press or on click outside.
When the content of the modal is too long, body will have overflow scroll.
Selects can be used in modal dialogs. While the modal is open, the select will be rendered on top of the modal and select will close first when escape key is pressed.
Modal will not close on escape key pressed or clicked outside. closable={false} prop can be used to toggle this behavior.
Name | Description | Default |
---|---|---|
children* | ReactNode | - |
closable | boolean | - |
initialFocus | number | MutableRefObject<HTMLElement> | - |
onClose | () => void | - |
onCloseAnimationEnd | () => void | - |
openOnMobileAs | how to open modal on mobile screens. default is 'fixed' "bottomsheet""drawer" | - |
state | { labelId: string; descriptionId: string; isOpen: boolean; setIsOpen: (v: SetStateAction<boolean>, ...args: any[]) => void; openModal: (event?: any) => void; closeModal: (event?: any) => void; } | - |
trigger | Element | - |