Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | 216x | import { OctagonAlert } from "lucide-react";
import { Dispatch, SetStateAction } from "react";
import { Button } from "@/ahuora-design-system/ui/button";
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
} from "@/ahuora-design-system/ui/dialog";
interface DeleteDialogProps {
projectName: string;
isOpen: boolean;
onOpenChange: Dispatch<SetStateAction<boolean>>;
onDelete: () => void;
onCancel: () => void;
}
export default function DeleteDialog({
projectName,
isOpen,
onOpenChange,
onDelete,
onCancel,
}: DeleteDialogProps) {
return (
<Dialog open={isOpen} onOpenChange={onOpenChange}>
<DialogContent
className="w-1/4 gap-8"
onClick={(e) => e.stopPropagation()}
>
<DialogHeader>
<DialogTitle className="flex flex-row items-center gap-4 text-xl">
<OctagonAlert className="icon-large text-rose-700" />
Permanent Deletion
</DialogTitle>
</DialogHeader>
<p className="text-base">
You are about to permanently delete
<span className="italic text-base"> {projectName}</span>.{" "}
<span className="font-extrabold text-base">
{" "}
This action cannot be undone.
</span>{" "}
Are you sure you want to proceed?
</p>
<div className="flex flex-row justify-end gap-2">
<Button
variant="outline"
onClick={onCancel}
aria-label="Cancel Delete Project Button"
>
Cancel
</Button>
<Button
variant="delete"
onClick={onDelete}
aria-label="Delete Project Button"
>
Delete
</Button>
</div>
</DialogContent>
</Dialog>
);
}
|