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.
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:
Used to request user for action confirmation, e.g. deleting items. Triggers provided 'onConfirm' callback.
<ConfirmModal isOpen={false} title="Delete user" body="Are you sure you want to delete this user?" confirmText="Confirm" icon="exclamation-triangle" onConfirm={() => console.log('Confirm action')} onDismiss={() => console.log('Dismiss action')} />
Name | Description | Default |
---|---|---|
isOpen* | Toggle modal's open/closed state boolean | - |
title* | Title for the modal header string | - |
body* | Modal content ReactNode | - |
description | Modal description ReactNode | - |
confirmText* | Text for confirm button string | - |
confirmVariant | Variant for confirm button "primary""secondary""destructive""success" | "destructive" |
dismissText | Text for dismiss button string | "Cancel" |
dismissVariant | Variant for dismiss button "primary""secondary""destructive""success" | "secondary" |
icon | Icon for the modal header "play""google""microsoft""github""gitlab""okta""discord""hipchat" | "exclamation-triangle" |
modalClass | Additional styling for modal container string | - |
confirmationText | Text user needs to fill in before confirming string | - |
alternativeText | Text for alternative button string | - |
confirmButtonVariant | Confirm button variant "primary""secondary""destructive""success" | "destructive" |
onConfirm* | Confirm action callback Return a promise to disable the confirm button until the promise is resolved () => void | Promise<void> | - |
onDismiss* | Dismiss action callback () => void | - |
onAlternative | Alternative action callback (() => void) | - |
disabled | Disable the confirm button and the confirm text input if needed boolean | - |