Skip to content

Help with checkbox props mismatching storybook controls #586

Discussion options

You must be logged in to vote

Oh I just realised also that the way you're setting the types on your component is not right.
I'm a bit confused as well because I see you referencing RadixCheckbox.CheckboxOwnProps but we don't export types so I'm wondering how that even works 🙂

Regardless, as I was saying earlier, CheckboxOwnProps will only contain the props we've explicitly added to it.

If you don't care about polymorphism, you only need React.elementRef and React.ComponentProps (see in link below).
If you do need polymorphism, you can use our type helpers.
Have a look here for an example of both: https://radix-ui.com/primitives/docs/overview/styling#styling-a-part

I don't really know how the controls thing you're doin…

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
13 replies
@acc-nicholas
Comment options

@benoitgrelard
Comment options

@acc-nicholas
Comment options

@acc-nicholas
Comment options

@benoitgrelard
Comment options

Answer selected by acc-nicholas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants