Overlays
Modal and full-screen overlays built on the shadcn Dialog, imported from @/components/ui/overlays (also re-exported from @/components/ui). For any yes/no confirmation, use ConfirmDialog instead of window.confirm(). Use ConfirmDeleteDialog when the action can’t be undone.
ConfirmDialog
Section titled “ConfirmDialog”A title, a description body and a Cancel/Confirm footer. It is the base for every confirmation in the app. Gotchas:
- Confirming doesn’t close the dialog. The caller closes it via
onOpenChange. isLoadingonly disables the buttons and shows no spinner. Pass customchildrenfor aLoadingButton.
Source: src/components/ui/overlays/ConfirmDialog.tsx
ConfirmDeleteDialog
Section titled “ConfirmDeleteDialog”A destructive confirmation that fires onConfirm only once the user has typed DELETE (trimmed, case-sensitive). Use it for teardowns such as account and organisation deletion. Closing it resets the typed text.
Source: src/components/ui/overlays/ConfirmDeleteDialog.tsx
ModerationRejectedDialog
Section titled “ModerationRejectedDialog”Shown when automated moderation rejects a publish, comment or upload. It lists the flagged categories and links to the report form, which is currently an external form; the in-app reporting queue is on the roadmap. It has no close X, only OK. Most callers spread dialogProps from the moderation hook. See Content Moderation Pipeline.
Source: src/components/ui/overlays/ModerationRejectedDialog.tsx
LoadingOverlay
Section titled “LoadingOverlay”A fixed, full-screen blurred overlay with a spinner and a message, for blocking operations such as uploads.