Spaces:
Sleeping
Sleeping
| import React from "react"; | |
| import { | |
| AlertDialog, | |
| AlertDialogAction, | |
| AlertDialogCancel, | |
| AlertDialogContent, | |
| AlertDialogDescription, | |
| AlertDialogFooter, | |
| AlertDialogHeader, | |
| AlertDialogTitle, | |
| } from "@/components/ui/alert-dialog"; | |
| interface DeleteChatDialogProps { | |
| isOpen: boolean; | |
| onOpenChange: (open: boolean) => void; | |
| onDelete: () => void; | |
| } | |
| export const DeleteChatDialog: React.FC<DeleteChatDialogProps> = ({ | |
| isOpen, | |
| onOpenChange, | |
| onDelete, | |
| }) => { | |
| return ( | |
| <AlertDialog open={isOpen} onOpenChange={onOpenChange}> | |
| <AlertDialogContent> | |
| <AlertDialogHeader> | |
| <AlertDialogTitle>Delete Chat</AlertDialogTitle> | |
| <AlertDialogDescription> | |
| Are you sure you want to delete this chat? This action cannot be undone. | |
| </AlertDialogDescription> | |
| </AlertDialogHeader> | |
| <AlertDialogFooter> | |
| <AlertDialogCancel>Cancel</AlertDialogCancel> | |
| <AlertDialogAction | |
| onClick={onDelete} | |
| className="bg-destructive text-destructive-foreground hover:bg-destructive/90" | |
| > | |
| Delete | |
| </AlertDialogAction> | |
| </AlertDialogFooter> | |
| </AlertDialogContent> | |
| </AlertDialog> | |
| ); | |
| }; | |