NativeBase
NativeBase copied to clipboard
Add back in ability to customize top-level box of Radio component
Is your feature request related to a problem? Please describe. Radios used to allow us to style the outermost box of the radio, but now it looks like it only accepts {...layoutProps}. This has made us unable to use the same styles we had before upgrading (and I don't see any way to apply styles on the new Radio to achieve the same effect).
For example, we previously styled Radios like this:
Now they are stuck looking like this:
Describe the solution you'd like I believe the simplest way to solve the issue while keeping with the current style paradigm would be to add a new sub-style for the outermost box (similar to how there is already a _radio [which seems like it was deprecated] and _interactionBox style group). I've encountered this same limitation on a few other components as well (like on the Checkbox component).
Describe alternatives you've considered I've considered trying to hack the component to make it work by applying a "position: relative" layoutProp to the top-level box and then applying "position: absolute" to the Center child component, but this isn't possible because all layoutProps get applied to the top-level Box only.
I've also considered creating my own wrapper or rolling an entirely custom Radio component, but I'm trying to avoid it.
Hi @kylegwalsh, thanks for reporting this issue. We'll look into this.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.