返回 presentation-ai
DeleteConfirmDialog.tsx
根目录 / src / components / presentation / slides / slide-editor / DeleteConfirmDialog.tsx
1 "use client";
2
3 import {
4 AlertDialog,
5 AlertDialogAction,
6 AlertDialogCancel,
7 AlertDialogContent,
8 AlertDialogDescription,
9 AlertDialogFooter,
10 AlertDialogHeader,
11 AlertDialogTitle,
12 } from "@/components/ui/alert-dialog";
13
14 interface DeleteConfirmDialogProps {
15 open: boolean;
16 onOpenChange: (open: boolean) => void;
17 onConfirm?: () => void;
18 }
19
20 export function DeleteConfirmDialog({
21 open,
22 onOpenChange,
23 onConfirm,
24 }: DeleteConfirmDialogProps) {
25 return (
26 <AlertDialog open={open} onOpenChange={onOpenChange}>
27 <AlertDialogContent>
28 <AlertDialogHeader>
29 <AlertDialogTitle>Delete slide?</AlertDialogTitle>
30 <AlertDialogDescription>
31 Are you sure you want to delete this slide? This action cannot be
32 undone.
33 </AlertDialogDescription>
34 </AlertDialogHeader>
35 <AlertDialogFooter>
36 <AlertDialogCancel>Cancel</AlertDialogCancel>
37 <AlertDialogAction
38 onClick={onConfirm}
39 className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
40 >
41 Delete
42 </AlertDialogAction>
43 </AlertDialogFooter>
44 </AlertDialogContent>
45 </AlertDialog>
46 );
47 }
48
48 lines Plain Text