I think it would be better to fix this at the root, here in palette-mobile, so that these^ contortions are not necessary and the RadioButton can simply be used as-is, with the text prop.
That's what this PR does:
Before
After
There are only a handful of cases in Eigen and Energy where the component is used as-is. Those will just inherit the improved alignment once they upgrade to this version of palette-mobile.
The more custom layouts I cited above should not be affected — though it might be nice to simplify those components and use the improved behavior now.
This PR resolves ONYX-819
Description
Radio buttons in palette-mobile currently suffer from poor alignment between button and text.
Example from SwA flow in Eigen:
It seems to me that people have worked around this problem in Eigen by building up custom flex layouts that include:
<RadioButton />
without thetext
prop<Text />
element<Touchable />
(Examples here and here and here)
I think it would be better to fix this at the root, here in palette-mobile, so that these^ contortions are not necessary and the
RadioButton
can simply be used as-is, with thetext
prop.That's what this PR does:
There are only a handful of cases in Eigen and Energy where the component is used as-is. Those will just inherit the improved alignment once they upgrade to this version of palette-mobile.
The more custom layouts I cited above should not be affected — though it might be nice to simplify those components and use the improved behavior now.