fix(admin): use theme-aware destructive foreground instead of hardcoded text-white
Local Build and Deploy / deploy (push) Successful in 1m14s

The danger confirm button used a hardcoded text-white class which failed the
admin theme source audit and could render unreadable against custom admin
themes. Switch to the semantic text-destructive-foreground token.

Also add media-grid.tsx to the graphical allowlist: its overlay badge sits
on top of arbitrary user images, so a fixed white-on-dark overlay is
intentional and not theme-chrome.

Restores the full test suite to green (303/303).
This commit is contained in:
openhands committed 2026-07-18 18:57:14 +02:00
1 parent 7dc15c1f59
commit 60eb45be73
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -102,7 +102,7 @@ export function ConfirmDialog({
variant={variant === "danger" ? "destructive" : "default"}
disabled={isLoading}
onClick={handleConfirm}
className={cn(variant === "danger" && "bg-destructive text-white")}
className={cn(variant === "danger" && "bg-destructive text-destructive-foreground")}
autoFocus
>
{confirmLabel}
+1
View File
@@ -8,6 +8,7 @@ const GRAPHICAL_ALLOWLIST = [
"src/app/admin/import/clone/import-clone-client.tsx",
"src/app/admin/import/furni/import-furni-client.tsx",
"src/components/admin/catalog/items-shop-preview.tsx",
"src/components/admin/media-grid.tsx",
];
const DATA_COLOR_ALLOWLIST = [