Spaces:
Running
Running
import React from 'react'; | |
import { | |
AlertDialog, | |
AlertDialogAction, | |
AlertDialogCancel, | |
AlertDialogContent, | |
AlertDialogDescription, | |
AlertDialogFooter, | |
AlertDialogHeader, | |
AlertDialogTitle | |
} from "@/components/ui/alert-dialog"; | |
interface DeleteMessageDialogProps { | |
isOpen: boolean; | |
onOpenChange: (open: boolean) => void; | |
onDelete: () => void; | |
} | |
export const DeleteMessageDialog: React.FC<DeleteMessageDialogProps> = ({ | |
isOpen, | |
onOpenChange, | |
onDelete | |
}) => { | |
return ( | |
<AlertDialog open={isOpen} onOpenChange={onOpenChange}> | |
<AlertDialogContent> | |
<AlertDialogHeader> | |
<AlertDialogTitle>Delete Message</AlertDialogTitle> | |
<AlertDialogDescription> | |
Are you sure you want to delete this message? 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> | |
); | |
}; | |