- Add fixed slab/slab-text/slab-muted tokens so utility strip and footer never invert to near-white in dark mode (root token split: ink is themed text, slab is fixed dark surface) - btn-ink uses fixed #111827 so confirm dialogs stay dark-on-dark readable - Toast error surface switched to slab; success uses text-white (not text-ink-on) - StatusBadge active and SimulationStatusBadge review_required/done use text-white instead of text-canvas/text-ink-on (prevents near-black text on colored pill in dark mode) - Modal backdrops (MitreMatrixModal, ConfirmDialog) switched to .modal-backdrop class (fixed rgba(0,0,0,0.6)) instead of bg-ink/60 which turned near-white - Card shadow lifted in dark mode via .dark .card-product override - MitreMatrixModal panel uses shadow-floating-dark in dark mode - UsersAdminPage form: items-start + explicit label-height spacer on button column for pixel-perfect baseline alignment (AC-17.3 structural fix) 92/92 tests passing, typecheck and lint clean. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
49 lines
1.4 KiB
TypeScript
49 lines
1.4 KiB
TypeScript
interface ConfirmDialogProps {
|
|
title: string;
|
|
description: string;
|
|
confirmLabel?: string;
|
|
cancelLabel?: string;
|
|
onConfirm: () => void;
|
|
onCancel: () => void;
|
|
destructive?: boolean;
|
|
}
|
|
|
|
export function ConfirmDialog({
|
|
title,
|
|
description,
|
|
confirmLabel = 'Confirm',
|
|
cancelLabel = 'Cancel',
|
|
onConfirm,
|
|
onCancel,
|
|
destructive = false,
|
|
}: ConfirmDialogProps): JSX.Element {
|
|
return (
|
|
<div
|
|
role="dialog"
|
|
aria-modal="true"
|
|
aria-labelledby="confirm-dialog-title"
|
|
className="fixed inset-0 z-50 flex items-center justify-center"
|
|
>
|
|
<div className="modal-backdrop absolute inset-0" onClick={onCancel} aria-hidden="true" />
|
|
<div className="relative card-product shadow-floating max-w-sm w-full mx-md flex flex-col gap-md">
|
|
<h2 id="confirm-dialog-title" className="text-[20px] font-medium text-ink">
|
|
{title}
|
|
</h2>
|
|
<p className="text-[16px] text-charcoal">{description}</p>
|
|
<div className="flex items-center gap-md pt-xs">
|
|
<button
|
|
type="button"
|
|
className={destructive ? 'btn-ink' : 'btn-primary'}
|
|
onClick={onConfirm}
|
|
>
|
|
{confirmLabel}
|
|
</button>
|
|
<button type="button" className="btn-outline-ink" onClick={onCancel}>
|
|
{cancelLabel}
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|