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.
This commit is contained in:
2 files changed
+13
-7
No files matched your search
@@ -10,12 +10,13 @@ const Checkbox = React.forwardRef<
|
||||
<CheckboxPrimitive.Root
|
||||
ref={ref}
|
||||
className={cn(
|
||||
'peer size-4 shrink-0 rounded-[4px] border border-border bg-transparent shadow-xs transition-colors',
|
||||
'peer size-4 shrink-0 rounded-[5px] border border-border bg-card shadow-xs transition-colors',
|
||||
'hover:border-border/80',
|
||||
'focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/40',
|
||||
'disabled:cursor-not-allowed disabled:opacity-50',
|
||||
'data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=checked]:border-primary',
|
||||
'data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground data-[state=indeterminate]:border-primary',
|
||||
className
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user