mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 01:40:13 -04:00
4a0bb36ca8
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
34 lines
890 B
TypeScript
34 lines
890 B
TypeScript
import { TextConfirmModal } from '@/components/ui/TextConfirmModalWrapper'
|
|
|
|
interface DeleteDestinationProps {
|
|
visible: boolean
|
|
isLoading: boolean
|
|
name: string
|
|
setVisible: (value: boolean) => void
|
|
onDelete: () => void
|
|
}
|
|
|
|
export const DeleteDestination = ({
|
|
visible,
|
|
isLoading,
|
|
name,
|
|
setVisible,
|
|
onDelete,
|
|
}: DeleteDestinationProps) => {
|
|
return (
|
|
<TextConfirmModal
|
|
variant="destructive"
|
|
visible={visible}
|
|
loading={isLoading}
|
|
title="Delete this destination"
|
|
confirmLabel={isLoading ? 'Deleting...' : `Delete destination`}
|
|
confirmPlaceholder="Type in name of destination"
|
|
confirmString={name ?? 'Unknown'}
|
|
text={`This will delete the destination "${name}"`}
|
|
alert={{ title: 'You cannot recover this destination once deleted.' }}
|
|
onCancel={() => setVisible(!visible)}
|
|
onConfirm={onDelete}
|
|
/>
|
|
)
|
|
}
|