moj-analytical-services / shinyGovstyle

Now up to GDS frontend version v4.0.0
37 stars 6 forks source link

GDS radio button update #86

Closed rmbielby closed 1 week ago

rmbielby commented 3 weeks ago

Covering off the radio button label centre alignment for inline buttons in accordance with Issue #60.

image

Note that it centre aligns within the overall container and not to the width of the options, so requires careful use by anyone using inline as it is. The remit says to centre align the text, but maybe it makes more sense to centre align the options as well as the text when inline?

sarahmwong commented 2 weeks ago

Thank you Rich! Sorry my comment wasn't very clear at all on the original issue - centre aligning the options (as in the text next to the buttons!) was what I'd meant - happy if the actual label text is left-aligned if this isn't too much of a pain to revert!

This fix looks good though and in line with the gov.uk expectations, and fixes the issue we have with text being underneath the radio buttons and slightly out of line in the current version - however I can't replicate your output in the run_example - does it need any other arguments added to it? Still looks like this for me:

Screenshot 2024-06-17 at 11 50 41
rmbielby commented 1 week ago

I'm ditching this one due to misunderstanding what was being asked for. Seemed easier after that to start afresh on a separate branch.