Keep delete affordances neutral until the confirmation

Row delete buttons, overflow-menu delete items and per-row revoke
buttons painted red in lists, so a list of tokens or shares read as a
wall of alarms. They now sit in the muted tone (foreground on hover)
or as an outline button; the red is kept for the confirmation dialog
that every one of them opens, and for the danger zones, which are a
destructive card-wide action by design.
This commit is contained in:
Marc-André Bombeck committed 2026-10-08 18:45:02 +02:00
1 parent 142dfa9360
commit 793c19e179
25 files changed
+21 -29

No files matched your search

@@ -868,7 +868,6 @@ export function LedgerRowItem({
<DropdownMenuSeparator />
<DropdownMenuItem
onClick={() => onDelete(intake.id as string)}
className="text-destructive focus:text-destructive"
data-slot="ledger-delete"
>
<Trash2 aria-hidden="true" className="mr-2 size-4" />
@@ -189,7 +189,7 @@ function CategoryRow({
type="button"
variant="ghost"
size="icon"
className="text-destructive hover:text-destructive size-11 sm:size-9"
className="text-muted-foreground hover:text-foreground size-11 sm:size-9"
onClick={() => onDelete(category)}
aria-label={`${t("medications.category.custom.delete")}: ${category.label}`}
title={t("medications.category.custom.delete")}
@@ -239,7 +239,7 @@ export function ScheduleHistoryTimeline({
type="button"
variant="ghost"
size="icon"
className="text-muted-foreground hover:text-destructive size-11 sm:size-8"
className="text-muted-foreground hover:text-foreground size-11 sm:size-8"
aria-label={t(
"medications.detail.zeitplan.history.deleteAria",
)}
@@ -313,7 +313,7 @@ export function CoursesRow({
type="button"
variant="ghost"
size="icon"
className="text-destructive hover:text-destructive size-11 sm:size-9"
className="text-muted-foreground hover:text-foreground size-11 sm:size-9"
onClick={() => setDeleting(course)}
aria-label={t("medications.course.delete")}
title={t("medications.course.delete")}
@@ -352,7 +352,7 @@ export function SideEffectsSection({ medicationId }: SideEffectsSectionProps) {
<Button
variant="ghost"
size="icon"
className="text-muted-foreground hover:text-destructive size-11 shrink-0"
className="text-muted-foreground hover:text-foreground size-11 shrink-0"
aria-label={t("medications.sideEffects.deleteCta")}
onClick={() => setPendingDeleteId(row.id)}
disabled={deleteMutation.isPending}
@@ -121,7 +121,7 @@ export function Step8Summary({
type="button"
variant="ghost"
size="sm"
className="text-muted-foreground hover:text-destructive h-8 gap-1 px-2 text-xs"
className="text-muted-foreground hover:text-foreground h-8 gap-1 px-2 text-xs"
onClick={() => onRemoveSchedule(index)}
disabled={!canRemove}
data-slot="wizard-schedule-remove"