We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<Checkbox> and <RadioButton> both use the <SelectorButton> component.
<Checkbox>
<RadioButton>
<SelectorButton>
Both files are literally identical, save for the selector prop specifying whether it's radio or checkbox.
selector
radio
checkbox
// ... const Checkbox = ({ checked, onClick, children, type, ...rest }) => ( <SelectorButton selector="checkbox" checked={checked} onClick={onClick} type={type} {...rest} > {children} </SelectorButton> );
Might it make sense to have one component in which you just specify the selector?
The text was updated successfully, but these errors were encountered:
Convert Option Button component
Sorry, something went wrong.
snags88
youngmanalive
No branches or pull requests
<Checkbox>
and<RadioButton>
both use the<SelectorButton>
component.Both files are literally identical, save for the
selector
prop specifying whether it'sradio
orcheckbox
.Might it make sense to have one component in which you just specify the
selector
?The text was updated successfully, but these errors were encountered: