Skip to content

Commit cf1b1dd

Browse files
authored
Fix type error emitted in build artifacts (#3530)
1 parent 3c047b0 commit cf1b1dd

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

.changeset/sad-colts-train.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@radix-ui/react-checkbox': patch
3+
---
4+
5+
Fix type error emitted in build artifacts

packages/react/checkbox/src/checkbox.tsx

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,24 @@ interface CheckboxProviderProps<State extends CheckedState = CheckedState> {
5353
children?: React.ReactNode;
5454
}
5555

56-
function CheckboxProvider<State extends CheckedState = CheckedState>({
57-
__scopeCheckbox,
58-
checked: checkedProp,
59-
children,
60-
defaultChecked,
61-
disabled,
62-
form,
63-
name,
64-
onCheckedChange,
65-
required,
66-
value = 'on',
67-
// @ts-expect-error
68-
internal_do_not_use_render,
69-
}: ScopedProps<CheckboxProviderProps<State>>) {
56+
function CheckboxProvider<State extends CheckedState = CheckedState>(
57+
props: ScopedProps<CheckboxProviderProps<State>>
58+
) {
59+
const {
60+
__scopeCheckbox,
61+
checked: checkedProp,
62+
children,
63+
defaultChecked,
64+
disabled,
65+
form,
66+
name,
67+
onCheckedChange,
68+
required,
69+
value = 'on',
70+
// @ts-expect-error
71+
internal_do_not_use_render,
72+
} = props;
73+
7074
const [checked, setChecked] = useControllableState({
7175
prop: checkedProp,
7276
defaultProp: defaultChecked ?? false,

0 commit comments

Comments
 (0)