Files
supabase/apps/studio/components/interfaces/EnvironmentVariables/DeleteEnvironmentVariableModal.tsx
Jonathan Summers-Muir f62a26e2b1 Add environment variables UI & dev branch support
Add a full environment variables UI (add/edit/delete forms, table, filters, hooks, constants, and utils) and an EnvironmentVariables diff panel to show promotable config changes between branches. Integrate env var awareness into Auth provider forms (show linked env var name, scopes, and quick link to env var page). Add branch-dev utilities and layout changes to group and render CLI-created dev branches under their parent branches (show dev member badge and support orphaned dev branches). Improve Auth providers list with inactive providers empty state and add-provider dialog. Misc: update next-env references and small package.json/csp.js tweaks.
2026-03-19 13:56:05 +08:00

36 lines
897 B
TypeScript

import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
interface DeleteEnvironmentVariableModalProps {
visible: boolean
variableName?: string
loading: boolean
onCancel: () => void
onConfirm: () => void
}
export const DeleteEnvironmentVariableModal = ({
visible,
variableName,
loading,
onCancel,
onConfirm,
}: DeleteEnvironmentVariableModalProps) => {
return (
<ConfirmationModal
variant="destructive"
loading={loading}
visible={visible}
confirmLabel="Delete variable"
confirmLabelLoading="Deleting variable"
title={`Delete variable "${variableName}"`}
onCancel={onCancel}
onConfirm={onConfirm}
>
<p className="text-sm">
Ensure none of your edge functions are actively using this variable before deleting it. This
action cannot be undone.
</p>
</ConfirmationModal>
)
}