Skip to content

Commit a85be28

Browse files
committed
fix(Checkbox): disabled style
1 parent 96d423e commit a85be28

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/components/ui/checkbox.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export function Checkbox({
3838
'flex size-5 cursor-pointer items-center justify-center rounded-sm outline-none',
3939
'focus-visible:ring-[3px] focus-visible:ring-ring/50',
4040
'data-checked:bg-primary data-unchecked:border data-unchecked:border-primary/50',
41+
'disabled:cursor-not-allowed disabled:bg-muted-foreground disabled:opacity-20',
4142
className
4243
)}
4344
{...props}
@@ -46,7 +47,7 @@ export function Checkbox({
4647
keepMounted={true}
4748
className={cn(
4849
'flex transition-transform duration-150 ease-in-out',
49-
'data-checked:scale-100 data-checked:rotate-0 data-unchecked:scale-50 data-unchecked:rotate-45'
50+
'data-checked:scale-100 data-checked:rotate-0 data-unchecked:invisible data-unchecked:scale-50 data-unchecked:rotate-45'
5051
)}
5152
>
5253
<CheckIcon className="size-3.5 stroke-3 text-primary-foreground" />

0 commit comments

Comments
 (0)