Carregando…
Carregando…
Carregando…Confirmation dialog with intent (danger/warning/primary), loading state and custom labels.
$ npx kikitocn add alert-dialog@/lib/utilsimport { AlertDialog } from "@/components/ui/cn/alert-dialog/AlertDialog";
export function AlertDialogExample() {
return (
<AlertDialog />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
open* | boolean | — | Controla se o dialog está aberto |
onOpenChange* | (open: boolean) => void | — | Callback quando o estado muda |
title* | string | — | Título do dialog |
description | string | undefined | Texto descritivo complementar |
confirmLabel | string | 'Confirmar' | Texto do botão de confirmação |
cancelLabel | string | 'Cancelar' | Texto do botão de cancelamento |
onConfirm | () => void | undefined | Callback ao confirmar |
onCancel | () => void | undefined | Callback ao cancelar |
intent | 'danger' | 'warning' | 'primary' | 'danger' | Cor do botão de confirmação |
loading | boolean | false | Exibe spinner no botão de confirmação |
Alert Dialog — confirmation modal with intent variants