From 8a94188dc61d161f9f07b8d6a2eb938c6bf946ef Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sun, 17 May 2026 14:11:29 +0800 Subject: [PATCH] fix(ui): dark-mode Switch + Checkbox visibility Both controls used `bg-muted` / `bg-background` for unchecked / thumb which collapse to the same hue as the surrounding card in dark mode, making them effectively invisible. - Switch: unchecked track now bg-input (light) / bg-muted-foreground/25 (dark) with a shadow-inner; thumb uses bg-card (light) / bg-foreground/95 (dark) so it pops in both states. - Checkbox: explicit bg-card + hover:border-border/80; slightly larger radius (5px) for visual rhythm with the rest of the surface. --- packages/ui/src/components/checkbox.tsx | 5 +++-- packages/ui/src/components/switch.tsx | 15 ++++++++++----- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/packages/ui/src/components/checkbox.tsx b/packages/ui/src/components/checkbox.tsx index f7e0bc60..e8119416 100644 --- a/packages/ui/src/components/checkbox.tsx +++ b/packages/ui/src/components/checkbox.tsx @@ -10,12 +10,13 @@ const Checkbox = React.forwardRef< diff --git a/packages/ui/src/components/switch.tsx b/packages/ui/src/components/switch.tsx index a8c875e2..4f4bf43f 100644 --- a/packages/ui/src/components/switch.tsx +++ b/packages/ui/src/components/switch.tsx @@ -9,18 +9,23 @@ const Switch = React.forwardRef<