GithubX

Alert Dialog

A modal that blocks the UI until the user responds.

## installation

pnpm dlx shadcn@latest add https://ascii.cnlibs.com/r/alert-dialog.json

## usage

import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog";
import { Button } from "@/components/ui/button";
<AlertDialog>
  <AlertDialogTrigger render={<Button variant="destructive">Delete</Button>} />
  <AlertDialogContent chWidth={44}>
    <AlertDialogHeader>
      <AlertDialogTitle>Delete project</AlertDialogTitle>
      <AlertDialogDescription>
        This will permanently delete ascii-ui and revoke every deploy
        key attached to it. This action cannot be undone.
      </AlertDialogDescription>
    </AlertDialogHeader>
    <AlertDialogFooter>
      <AlertDialogCancel>Cancel</AlertDialogCancel>
      <AlertDialogAction>Delete project</AlertDialogAction>
    </AlertDialogFooter>
  </AlertDialogContent>
</AlertDialog>