Code Assistance - SingleValue Label change Font-Size

Hello guys!

I need some help with code, I wanna know if is there a way to change the Font Size of the Label in the React component:

Thank you, for all :slightly_smiling_face:

Hi @MaximilianoML

AFAIK, The SingleValue component doesn’t provide a way to change the size of a label.

You can of course change it via CSS since label has a specific class applied to it. However, I wouldn’t recommend it.

What’s your usecase?

Thanks

Hi @imsingh

Using CSS is a good idea, I tried but I didn’t find a way to change by CSS… I want to reduce 50% of the size.

If you have a code snippet to active this, let me know :slightly_smiling_face:

Thanks a lot,

Maximiliano Lopes

Hi MaximilianoML

Can you try the following code snippet without label property but using a Heading component? This give you more control than using the `label` property.

<StyledContainer>
        <Heading level={6}>My Custom Label</Heading>
        <SingleValue
          data={70000000}
          formatter={formatter}
          prefixIcon={<ViewIcon />}
          unit={'B'}
        />
      </StyledContainer>

Perfect!

Great and simple solution, thank you! :grin: