Skip to content

Label position left of control #30167

Answered by sopranopillow
Ofer-Gal asked this question in Q&A
Discussion options

You must be logged in to vote

If you are interested, v9 does follow that idea, but I understand if migrating is not an option. That being said, one way to quickly know which classname in the styles you should use is by taking a look at the component's base implementation i.e. ChoiceGroup.base.tsx. Here's the render function for ChoiceGroup:

<div role="radiogroup" {...(ariaLabelledBy && { 'aria-labelledby': ariaLabelledBy })} onFocus={onRadioFocus}>

as you can see, there's a wrapper impeding the quick fix you showed from working. this will require some selectors in the styles, something like this:

const ChoiceG…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Ofer-Gal
Comment options

@sopranopillow
Comment options

Answer selected by sopranopillow
@Ofer-Gal
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants