DS | Adila.co
Componentes

Alert Dialog

Componente alert-dialog do design system adila.co.

Instalação

bun add @adila-sh/ui

Uso

import {
  AlertDialog,
  AlertDialogAction,
  AlertDialogCancel,
  AlertDialogContent,
  AlertDialogDescription,
  AlertDialogFooter,
  AlertDialogHeader,
  AlertDialogTitle,
  AlertDialogTrigger,
} from '@adila-sh/ui';
import { Button } from '@adila-sh/ui';

export function Example() {
  return (
    <AlertDialog>
      <AlertDialogTrigger
        render={<Button variant="destructive">Excluir conta</Button>}
      />
      <AlertDialogContent>
        <AlertDialogHeader>
          <AlertDialogTitle>Excluir conta?</AlertDialogTitle>
          <AlertDialogDescription>
            Esta ação não pode ser desfeita. Todos os seus dados serão removidos
            permanentemente dos nossos servidores.
          </AlertDialogDescription>
        </AlertDialogHeader>
        <AlertDialogFooter>
          <AlertDialogCancel>Cancelar</AlertDialogCancel>
          <AlertDialogAction variant="destructive">Excluir</AlertDialogAction>
        </AlertDialogFooter>
      </AlertDialogContent>
    </AlertDialog>
  );
}

Dependências

Componentes relacionados

Nesta página