Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Add ability to set labels as html #25

Open
ragingdave opened this issue May 13, 2021 · 1 comment
Open

[FEATURE REQUEST] Add ability to set labels as html #25

ragingdave opened this issue May 13, 2021 · 1 comment
Labels

Comments

@ragingdave
Copy link

In order to be able to further customize the radio labels, it might be nice to be able to set the label as html. This would enable bolding or colors or anything else. I'm not saying this package would have to account for style mistakes as a result of enabling html, just to enable html support. This would be akin to how the Text field can display as html in nova already.

@OwenMelbz OwenMelbz added enhancement New feature or request wating-for-feedback labels Jul 27, 2021
@OwenMelbz
Copy link
Owner

@ragingdave Are you able to modify and recompile this yourself as a test?

I don't have access to Nova anymore so cannot easily check much.

<span class="mlbz-radio-label">{{ getOptionLabel(option) }}</span>

If you change this to

<span class="mlbz-radio-label" v-html="getOptionLabel(option)"></span>

Then compile it, you can then try passing in a label with HTML and see if it works.

Otherwise you could always try use CSS to target, e.g. the label generates a unique "for" e.g.

<label for="accountType_premium">
<label for="accountType_basic">
<label for="accountType_trial">

You can then add a selector like... .mlbz-radio-container label[for="accountType_premium"] span etc to style them with just CSS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants