Skip to content

Commit cb5670a

Browse files
committed
refactor: update checkbox border styles for consistency
Updated border styles for checkbox components to ensure uniform appearance. Added 'group-hover:border-primary' class to CheckboxCards for hover effect.
1 parent 5895295 commit cb5670a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/ui/src/components/checkbox-cards.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,16 @@ const CheckboxCardsItem = forwardRef<
4747
>(({ children, className, checkboxClassName, ...props }, forwardedRef) => (
4848
<label
4949
className={cn(
50-
'flex items-center justify-center gap-4 rounded-md border p-4',
50+
'group flex items-center justify-center gap-4 rounded-md border p-4',
5151
className,
5252
)}
5353
>
5454
{children}
5555
<CheckboxGroupPrimitive.Item
5656
ref={forwardedRef}
5757
className={cn(
58-
'border-input peer flex size-4 shrink-0 cursor-pointer rounded-sm border shadow-sm',
58+
'border-input peer flex size-4 shrink-0 cursor-pointer rounded border shadow-sm',
59+
'group-hover:border-primary',
5960
'aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground',
6061
'focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1',
6162
'disabled:cursor-default disabled:opacity-50',

packages/ui/src/components/checkbox-group.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const CheckboxGroupItem = forwardRef<
4747
ref={forwardedRef}
4848
className={cn(
4949
[
50-
'border-input peer flex size-4 shrink-0 rounded-sm border shadow-sm',
50+
'border-input peer flex size-4 shrink-0 rounded border shadow-sm',
5151
'hover:border-primary',
5252
'aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground',
5353
'focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1',

packages/ui/src/components/checkbox.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const Checkbox = forwardRef<CheckboxElement, CheckboxProps>(
1919
<CheckboxPrimitive.Root
2020
ref={forwardedRef}
2121
className={cn(
22-
'border-input peer inline-flex size-4 shrink-0 rounded-sm border shadow-sm',
22+
'border-input peer inline-flex size-4 shrink-0 rounded border shadow-sm',
2323
'hover:border-primary',
2424
'aria-checked:border-primary aria-checked:bg-primary aria-checked:text-primary-foreground',
2525
'focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-1',

0 commit comments

Comments
 (0)