Font Weight in Parameters (choose type)

I have a headline component with a parameter for the font weight using the “choose” type, and I’m passing as values “fw-normal” and “fw-bold”, but for some reason it’s not working.
Here you have a screenshot of what I’m doing
WDM Atoms - Component - Cornerstone 2023-04-20 at 2.07.59 PM

I realized I was using an incomplete shortcode, I change it to {{dc:p:setup.fontWeight}} but still doesn’t work

the only option is to pass the numeric font weight as value

Right now it’s setup where it needs to be preceded by fw: So it’d be fw:fw-normal for your value. Internally too “fw-normal” maps to “normal” so you can use that. Bold is the same way. Let me know if this helps!

If you meant like this:

“fontWeight” : {
“type” : “choose”,
“label” : “Font Weight”,
“initial” : “fw:fw-normal”,
“options” : [
{ “label” : “Normal”, “value” : “fw:fw-normal” },
{ “label” : “Bold”, “value” : “fw:fw-bold” }
]
},

Is not working :frowning:

Hi @mcostales84,

It should work as explained by Charlie. If that is not, I would suggest you share the credentials so we can investigate the reason behind it.

Thanks

Find attached the credentials. Go to the headline element in the Atoms component

any update on this?

Sorry it was global-fw: as a prefix. Choose also isn’t setup for this, but we can try to make it work. It’s also split by |. With the first value being the font family if you use inherit that will also work. I changed that component so you can see as well. Have a great day!

global-fw:inherit|fw-bold

1 Like

Awesome!
Thanks.
So the choose option works :wink:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.