-
Notifications
You must be signed in to change notification settings - Fork 12
Add radio input #340
New issue
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
base: master
Are you sure you want to change the base?
Add radio input #340
Conversation
pixelbandito
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of nice-to-have comments.
Also, I don't see tests, but I'm ok with that being a follow-on.
| <h1>Input.Radio</h1> | ||
| <Input | ||
| onChange={(e) => | ||
| console.log(e.target.checked) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't gonna hurt anything, but you don't need to leave a console log in here. If I did it for checkbox, it was a mistake.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
going to remove this from checkbox as well
| putting IDs on input elements, but they are. | ||
| */} | ||
| {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */} | ||
| <label className="text-xl inline-block mb-2"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be able to remove the eslint-disable by adding htmlFor="SampleRadio", since you're not using the InteractiveInput wrapper anymore.
This PR adds radio to the list of Rover UI Inputs
I also removed the onChange prop in Interactive Input to make it more flexible and so it can properly report synthetic events in the Actions tab.