draupnir4all-web

git clone git://archive.git.mtrnord.blog/MTRNord/draupnir4all-web.git
Log | Files | Refs | README | LICENSE

are-you-sure.tsx (1569B)


      1 import { Button } from "@/components/ui/button";
      2 import { Dialog, DialogCloseButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@/components/ui/dialog";
      3 import { Trash2 } from "lucide-react";
      4 
      5 interface AreYouSureDialogProps {
      6     description: string;
      7     titlePart: string
      8 }
      9 
     10 export default function AreYouSureDialog({ description, titlePart }: AreYouSureDialogProps) {
     11     return (
     12         <Dialog>
     13             <DialogTrigger asChild>
     14                 <Button variant="ghost" size="sm" className="h-8 w-8 p-0 text-gray-400 hover:text-red-400">
     15                     <Trash2 className="h-4 w-4" />
     16                     <span className="sr-only">Remove</span>
     17                 </Button>
     18             </DialogTrigger>
     19             <DialogContent className="bg-gray-950 border-gray-800">
     20                 <DialogHeader>
     21                     <DialogTitle>Remove {titlePart}</DialogTitle>
     22                     <DialogDescription className="text-gray-400">
     23                         {description}
     24                     </DialogDescription>
     25                 </DialogHeader>
     26                 <DialogFooter>
     27                     <DialogCloseButton
     28                         className="border-gray-700 text-gray-400 hover:bg-gray-900 hover:text-gray-300"
     29                     >
     30                         Cancel
     31                     </DialogCloseButton>
     32                     <Button className="bg-red-600 text-white hover:bg-red-700">Remove {titlePart}</Button>
     33                 </DialogFooter>
     34             </DialogContent>
     35         </Dialog >
     36     )
     37 }