registry/default/variants/v-alert-dialog-2.tsx
import { BluetoothIcon } from "lucide-react";
import {
AlertDialog,
AlertDialogClose,
AlertDialogContent,
AlertDialogDescription,
AlertDialogFooter,
AlertDialogHeader,
AlertDialogTitle,
AlertDialogTrigger,
} from "@/registry/default/ui/alert-dialog";
import { Button } from "@/registry/default/ui/button";
export function Pattern() {
return (
<AlertDialog>
<AlertDialogTrigger
render={<Button variant="outline">Small (Media)</Button>}
/>
<AlertDialogContent className="max-w-xs">
<AlertDialogHeader>
<div className="flex size-12 items-center justify-center rounded-full border bg-muted text-foreground [&_svg]:size-6">
<BluetoothIcon />
</div>
<AlertDialogTitle>Allow accessory to connect?</AlertDialogTitle>
<AlertDialogDescription>
Do you want to allow the USB accessory to connect to this device?
</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogClose render={<Button variant="outline" />}>
Don't allow
</AlertDialogClose>
<AlertDialogClose render={<Button />}>Allow</AlertDialogClose>
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
);
}
















