ConfirmDialog
proConfirmDialog wraps Dialog with a status icon, title, message, and cancel/confirm button pair for destructive or informational confirmations.
Installation
Add this component with the NateUI CLI.
Examples
Status Types
Custom Buttons
Controlled
API
| Prop | Description | Type | Default |
|---|---|---|---|
isOpen | Controls whether the dialog is visible. | boolean | — |
type | Status variant that determines the icon and color. | 'info' | 'success' | 'warning' | 'danger' | 'info' |
title | Dialog heading text. | ReactNode | string | — |
children | Message body rendered below the title. | ReactNode | — |
confirmText | Label for the confirm button. | ReactNode | string | 'Confirm' |
cancelText | Label for the cancel button. | ReactNode | string | 'Cancel' |
onConfirm | Called when the confirm button is clicked. | () => void | — |
onCancel | Called when the cancel button is clicked. | () => void | — |
confirmButtonProps | Props forwarded to the confirm Button. | ButtonProps | — |
cancelButtonProps | Props forwarded to the cancel Button. | ButtonProps | — |
closable | Show a close button in the dialog header. | boolean | false |
size | Width of the dialog. | 'sm' | 'md' | 'lg' | 'md' |