mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-12-08 06:15:43 +03:00
47 lines
1.1 KiB
TypeScript
47 lines
1.1 KiB
TypeScript
|
|
import {
|
||
|
|
AlertDialog,
|
||
|
|
AlertDialogAction,
|
||
|
|
AlertDialogCancel,
|
||
|
|
AlertDialogContent,
|
||
|
|
AlertDialogDescription,
|
||
|
|
AlertDialogFooter,
|
||
|
|
AlertDialogHeader,
|
||
|
|
AlertDialogTitle,
|
||
|
|
} from "@/components/ui/alert-dialog";
|
||
|
|
|
||
|
|
type DeleteSearchDialogProps = {
|
||
|
|
isOpen: boolean;
|
||
|
|
onClose: () => void;
|
||
|
|
onConfirm: () => void;
|
||
|
|
searchName: string;
|
||
|
|
};
|
||
|
|
|
||
|
|
export function DeleteSearchDialog({
|
||
|
|
isOpen,
|
||
|
|
onClose,
|
||
|
|
onConfirm,
|
||
|
|
searchName,
|
||
|
|
}: DeleteSearchDialogProps) {
|
||
|
|
return (
|
||
|
|
<AlertDialog open={isOpen} onOpenChange={onClose}>
|
||
|
|
<AlertDialogContent>
|
||
|
|
<AlertDialogHeader>
|
||
|
|
<AlertDialogTitle>Are you sure?</AlertDialogTitle>
|
||
|
|
<AlertDialogDescription>
|
||
|
|
This will permanently delete the saved search "{searchName}".
|
||
|
|
</AlertDialogDescription>
|
||
|
|
</AlertDialogHeader>
|
||
|
|
<AlertDialogFooter>
|
||
|
|
<AlertDialogCancel onClick={onClose}>Cancel</AlertDialogCancel>
|
||
|
|
<AlertDialogAction
|
||
|
|
onClick={onConfirm}
|
||
|
|
className="bg-destructive text-white"
|
||
|
|
>
|
||
|
|
Delete
|
||
|
|
</AlertDialogAction>
|
||
|
|
</AlertDialogFooter>
|
||
|
|
</AlertDialogContent>
|
||
|
|
</AlertDialog>
|
||
|
|
);
|
||
|
|
}
|