-
Notifications
You must be signed in to change notification settings - Fork 25
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
radio options #107
radio options #107
Conversation
✅ Deploy Preview for remix-forms canceled.
|
2f0080d
to
9d6434d
Compare
7555c5e
to
5ba07d3
Compare
apps/web/app/routes/examples/forms/form-with-radio-children.tsx
Outdated
Show resolved
Hide resolved
apps/web/app/routes/examples/forms/form-with-radio-children.tsx
Outdated
Show resolved
Hide resolved
d07c32b
to
562d482
Compare
@danielweinmann I think we should default the radio group wrapper to a Thoughts? |
👌🏼 |
@diogob, I think |
…(with the exception of being used to define Options in createForm where we add the dependency to the generic derived from schema.
…ptions as radio groups
…be parsed as strings (including enums)
…io wrapper accordingly
…troduce a wrapper for the individual radio button
…o we are closer to MDN's example code https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/Radio_Role
b4e2d2e
to
3f0b271
Compare
2593fd3
to
fcb6bc8
Compare
@danielweinmann you can take a look now, introducing unit tests will require a little more research and I'll do it in a future PR. |
* Apply code review suggestions Co-authored-by: Daniel Weinmann <danielweinmann@gmail.com>
This PR will add three properties to the
Form
component.radio
takes a list of fields to be rendered as radio button groups.radioGroupWrapperComponent
takes a tag name or a component which will wrap radio button groups.radioWrapperComponent
takes a tag name or a component which will wrap individual radio buttons.radioComponent
takes a tag name or a component which will render each radio button.They are all optional therefore no breaking change is introduced.
This should address #54
TODO
radioWrapperComponent
toradioGroupComponent
.radioWrapperComponent
to wrap around individual radio options.