Skip to content

Commit 3fa0aed

Browse files
committed
fix(web): distinguish segmented dark states
1 parent d0802d0 commit 3fa0aed

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/web/src/components/ui/toggle-group.test.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@ describe("toggle group segmented defaults", () => {
1313

1414
expect(html.match(/data-size="segmented"/g)).toHaveLength(2);
1515
expect(html).toContain("h-6");
16+
expect(html).toContain("dark:hover:bg-input/32");
17+
expect(html).toContain("dark:data-pressed:bg-input/72");
1618
});
1719
});

‎apps/web/src/components/ui/toggle.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const toggleVariants = cva(
3030
outline:
3131
"border-input bg-background not-dark:bg-clip-padding shadow-xs/5 not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:bg-input/32 dark:data-pressed:bg-input dark:hover:bg-input/64 dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] dark:not-disabled:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/2%)] [:disabled,:active,[data-pressed]]:shadow-none",
3232
segmented:
33-
"border-transparent text-muted-foreground shadow-none transition-colors before:shadow-none hover:bg-background/55 hover:text-foreground data-pressed:bg-background data-pressed:text-foreground data-pressed:shadow-xs/10",
33+
"border-transparent text-muted-foreground shadow-none transition-colors before:shadow-none hover:bg-background/55 hover:text-foreground data-pressed:bg-background data-pressed:text-foreground data-pressed:shadow-xs/10 dark:hover:bg-input/32 dark:data-pressed:bg-input/72",
3434
},
3535
},
3636
},

0 commit comments

Comments
 (0)