Skip to content
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Commit a6691e0

Browse files
committed
update checkbox
1 parent 8090ea7 commit a6691e0

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

components/src/components/Checkbox/Checkbox.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,39 @@ type Props = BaseProps & (WithTone | WithoutTone) & RadixCheckboxRoot & RadixChe
2828

2929
export const Checkbox = React.forwardRef(
3030
(
31-
{ label, checked, size = 'small', tone = 'accent', variant = 'primary' }: Props,
31+
{
32+
label,
33+
checked,
34+
defaultChecked,
35+
onCheckedChange,
36+
required,
37+
disabled,
38+
name,
39+
value,
40+
asChild,
41+
size = 'small',
42+
tone = 'accent',
43+
variant = 'primary',
44+
}: Props,
3245
ref: React.Ref<HTMLButtonElement>,
3346
) => {
3447
return (
3548
<Box alignItems="center" display="flex" gap="2" ref={ref}>
3649
<RadixCheckbox.Root
50+
asChild={asChild}
3751
checked={checked}
3852
className={styles.variants({
3953
size,
4054
tone,
4155
variant,
4256
})}
57+
defaultChecked={defaultChecked}
58+
disabled={disabled}
59+
name={name}
4360
ref={ref}
61+
required={required}
62+
value={value}
63+
onCheckedChange={onCheckedChange}
4464
>
4565
<RadixCheckbox.Indicator
4666
className={styles.indicatorVariants({

components/src/components/Checkbox/styles.css.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ export const indicatorVariants = recipe({
169169
display: 'flex',
170170
alignItems: 'center',
171171
justifyContent: 'center',
172+
color: 'white',
172173
}),
173174
]),
174175
variants: {

0 commit comments

Comments
 (0)