Closed jordevo closed 4 months ago
🔍 Show
TASK: N/A
Currently, passing className to <PrimitiveTypography/> as a prop doesn't do anything, although it is documented as a legit prop.
className
<PrimitiveTypography/>
This fixes the issue and allows for the extension of styles via classes when using this component.
Given this piece of React code:
<PrimitiveTypography as="h1" design="body-1" fontWeight="semi-bold" className="mt-TypographyBasic"> lorem ipsum </PrimitiveTypography>
The current output would be:
<h1 class="sui-PrimitiveTypography sui-PrimitiveTypography-design-body-1 sui-PrimitiveTypography-variant-default sui-PrimitiveTypography-fontSize-m sui-PrimitiveTypography-fontWeight-semi-bold sui-PrimitiveTypography-lineHeight-xl">lorem ipsum</h1>
The fix will make the output to be:
<h1 class="sui-PrimitiveTypography sui-PrimitiveTypography-design-body-1 sui-PrimitiveTypography-variant-default sui-PrimitiveTypography-fontSize-m sui-PrimitiveTypography-fontWeight-semi-bold sui-PrimitiveTypography-lineHeight-xl mt-TypographyBasic">lorem ipsum</h1>
Primitive/Typography
🔍 Show
TASK: N/A
Description, Motivation and Context
Currently, passing
className
to<PrimitiveTypography/>
as a prop doesn't do anything, although it is documented as a legit prop.This fixes the issue and allows for the extension of styles via classes when using this component.
Types of changes
Code example
Given this piece of React code:
The current output would be:
The fix will make the output to be: