Skip to content

Settings

Ghldelete key modal

A two-step confirmation dialog for removing a saved GoHighLevel API key, warning about disrupted syncs before requesting a six-digit emailed verification code.
Available
Ports as-is

Examples

Rendered live from the maintained Storybook story. Lantern stores only the story id and embeds Storybook rather than duplicating the component or its demo.

Ghldelete key modal

Rendered live from Storybook

Storybook must be running for this to load — bun run start:storybook from the monorepo root, or set NEXT_PUBLIC_STORYBOOK_URL to a deployed instance.

Props

The component's public API, read from its TypeScript source. Descriptions come from TSDoc on the prop, so this table cannot drift from the component.

PropTypeDefaultDescription
open*boolean—Undocumented — add TSDoc to the prop in the library.
onOpenChange(open: boolean) => void—Undocumented — add TSDoc to the prop in the library.
apiKey*SavedApiKey | null—The key being removed. `null` renders nothing — the host clears it on close.
onConfirmDelete(id: string) => void—Fired with the key id once six digits have been entered.
onSendCode() => void—Fired when "Send verification code" is pressed.
onResendCode() => void—Fired when the resend link is pressed.
initialStepGHLDeleteKeyStep"confirm"Which step to render on mount. Both halves are static stories.
initialOtpValuestring""Seeds the OTP field. Six digits does NOT auto-confirm on mount — see notes.
countdownnumberGHL_DELETE_KEY_RESEND_SECONDSSeconds shown on the resend link. Fixed by default; nothing counts down.
resetOnReopenbooleantrueRe-runs the source's reset-to-`confirm` behaviour when `open` goes false → true. Never fires on mount, so `initialStep` survives.

Reference

Transcribed from the component audit. If this disagrees with the source, the source is right.

Source
src/components/settings/ghl/GHLDeleteKeyModal.tsx
Portability
Copies across unchanged — only the utils import path moves.
Notes
Use when an operator wants to delete a GHL API key that automations may depend on; the extra verification step is the intended friction for a change that can silently break active syncs. The dialog renders nothing if no key is supplied, so the host must keep the target key in state until the close animation finishes.