Confirm
A confirmation dialog for destructive actions.
Installation
pnpm dlx shadcn@latest add @chelone/confirmA confirmation dialog for destructive actions.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| cancel | string | — | |
| CancelIcon | ComponentType<{ className?: string }> | — | |
| className | string | — | |
| confirm | string | — | |
| confirmColor | "primary" | "warning" | — | |
| ConfirmIcon | ComponentType<{ className?: string }> | — | |
| content | ReactNode | — | |
| contentTranslateOptions | object | — | |
| defaultOpen | boolean | — | Forwarded to Radix `Dialog.Root` — uncontrolled initial open state. |
| isOpen | boolean | — | |
| loading | boolean | — | |
| modal | boolean | — | Forwarded to Radix `Dialog.Root` — sets modality. |
| onClose | (event: MouseEvent<Element, MouseEvent>) => void | — | |
| onConfirm | MouseEventHandler | — | |
| title | ReactNode | — | |
| titleTranslateOptions | object | — | |
| translateOptions | object | — |