cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Code Assistance - SingleValue Label change Font-Size

MaximilianoML
Helper

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:

MaximilianoML_1-1730224550882.png

MaximilianoML_3-1730224675997.png

 

Thank you, for all 🙂

 

Fullstack developer | Tech Lover
3 REPLIES 3

imsingh
Dynatrace Advisor
Dynatrace Advisor

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 🙂

Thanks a lot,

Maximiliano Lopes 

Fullstack developer | Tech Lover

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>

 

Featured Posts