File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
apps/webapp/app/components/primitives Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import { type ShortcutDefinition, useShortcutKeys } from "~/hooks/useShortcutKey
7
7
8
8
const small = {
9
9
container :
10
- "flex items-center h-[1.5rem] gap-x-1.5 rounded hover:bg-tertiary disabled:hover:bg-transparent pr-1 py-[0.1rem] pl-1.5 transition focus-custom disabled:hover:text-charcoal-400 disabled: opacity-50 text-charcoal-400 hover:text-charcoal-200 disabled:hover:cursor-not-allowed hover:cursor-pointer" ,
10
+ "flex items-center h-[1.5rem] gap-x-1.5 rounded hover:bg-tertiary pr-1 py-[0.1rem] pl-1.5 hover:disabled:bg-charcoal-700 transition focus-custom disabled:opacity-50 text-text-dimmed hover:text-text-bright disabled:hover:cursor-not-allowed hover:cursor-pointer disabled:hover:text-rose-500 " ,
11
11
root : "h-3 w-6" ,
12
12
thumb : "size-2.5 data-[state=checked]:translate-x-2.5 data-[state=unchecked]:translate-x-0" ,
13
13
text : "text-xs text-text-dimmed" ,
@@ -28,7 +28,10 @@ const variations = {
28
28
"group-data-[state=unchecked]:bg-charcoal-600 group-data-[state=unchecked]:group-hover:bg-charcoal-500/50"
29
29
) ,
30
30
thumb : small . thumb ,
31
- text : cn ( small . text , "transition group-hover:text-text-bright" ) ,
31
+ text : cn (
32
+ small . text ,
33
+ "transition group-hover:text-text-bright group-disabled:group-hover:text-text-dimmed"
34
+ ) ,
32
35
} ,
33
36
} ;
34
37
@@ -64,7 +67,12 @@ export const Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitives.
64
67
ref = { innerRef }
65
68
>
66
69
{ label ? (
67
- < label className = { cn ( "whitespace-nowrap" , text ) } >
70
+ < label
71
+ className = { cn (
72
+ "cursor-pointer whitespace-nowrap group-disabled:cursor-not-allowed" ,
73
+ text
74
+ ) }
75
+ >
68
76
{ typeof label === "string" ? < span > { label } </ span > : label }
69
77
</ label >
70
78
) : null }
You can’t perform that action at this time.
0 commit comments