From 8efc696dcddc94b1c248a099207ad97c932a545b Mon Sep 17 00:00:00 2001 From: enkeii64 Date: Thu, 17 Jul 2025 20:54:31 +1000 Subject: feat: update delete project dialog --- apps/web/src/components/delete-project-dialog.tsx | 121 ++++++++++++---------- 1 file changed, 68 insertions(+), 53 deletions(-) (limited to 'apps/web/src/components') diff --git a/apps/web/src/components/delete-project-dialog.tsx b/apps/web/src/components/delete-project-dialog.tsx index db709647..e2b32dda 100644 --- a/apps/web/src/components/delete-project-dialog.tsx +++ b/apps/web/src/components/delete-project-dialog.tsx @@ -1,53 +1,68 @@ -import { Button } from "@/components/ui/button"; -import { - Dialog, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, -} from "@/components/ui/dialog"; - -export function DeleteProjectDialog({ - isOpen, - onOpenChange, - onConfirm, -}: { - isOpen: boolean; - onOpenChange: (open: boolean) => void; - onConfirm: () => void; -}) { - return ( - - { - e.preventDefault(); - e.stopPropagation(); - }} - > - - Delete Project - - Are you sure you want to delete this project? This action cannot be - undone. - - - - - - - - - ); -} +import { Button } from "@/components/ui/button"; +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from "@/components/ui/dialog"; +import { cn } from "@/lib/utils"; + +export function DeleteProjectDialog({ + isOpen, + onOpenChange, + onConfirm, + projectName, +}: { + isOpen: boolean; + onOpenChange: (open: boolean) => void; + onConfirm: () => void; + projectName?: string; +}) { + return ( + + { + e.preventDefault(); + e.stopPropagation(); + }} + > + + + {projectName ? ( + <> + {"Delete '"} + + {projectName} + + {"'?"} + + ) : ( + "Delete Project?" + )} + + + Are you sure you want to delete this project? This action cannot be + undone. + + + + + + + + + ); +} -- cgit v1.3.1