29 Oct 2024 06:00 PM
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 🙂
30 Oct 2024 08:46 AM - edited 30 Oct 2024 08:48 AM
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
30 Oct 2024 09:22 AM
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
12 Nov 2024 02:54 PM - edited 13 Nov 2024 03:07 PM
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>