NativeBase icon indicating copy to clipboard operation
NativeBase copied to clipboard

Add back in ability to customize top-level box of Radio component

Open kylegwalsh opened this issue 3 years ago • 3 comments

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: image

Now they are stuck looking like this: image

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.

kylegwalsh avatar Dec 22 '21 17:12 kylegwalsh

Hi @kylegwalsh, thanks for reporting this issue. We'll look into this.

surajahmed avatar Dec 29 '21 09:12 surajahmed

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.

stale[bot] avatar Feb 27 '22 18:02 stale[bot]

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.

stale[bot] avatar May 25 '22 20:05 stale[bot]