Fix heading variants
Signed-off-by: Charles de Dreuille <charles.dedreuille@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/canon': patch
|
||||
---
|
||||
|
||||
Fix styling for the title4 prop on the Heading component in Canon.
|
||||
@@ -59,6 +59,7 @@ appearance of the heading.
|
||||
<Heading variant="title2">Title 2</Heading>
|
||||
<Heading variant="title3">Title 3</Heading>
|
||||
<Heading variant="title4">Title 4</Heading>
|
||||
<Heading variant="title5">Title 5</Heading>
|
||||
</Flex>`}
|
||||
/>
|
||||
|
||||
@@ -78,6 +79,17 @@ heading.
|
||||
</Heading>`}
|
||||
/>
|
||||
|
||||
### Custom render
|
||||
|
||||
You can also use the `render` prop to render the heading as a different element.
|
||||
|
||||
<Snippet
|
||||
py={2}
|
||||
open
|
||||
preview={<HeadingSnippet story="CustomRender" />}
|
||||
code={`<Heading render={<h4 />}>Custom render</Heading>`}
|
||||
/>
|
||||
|
||||
### Responsive
|
||||
|
||||
You can also use the `variant` prop to change the appearance of the text based
|
||||
|
||||
@@ -117,6 +117,16 @@ text.
|
||||
</Text>`}
|
||||
/>
|
||||
|
||||
### Custom render
|
||||
|
||||
You can also use the `render` prop to render the text as a different element.
|
||||
|
||||
<Snippet
|
||||
open
|
||||
preview={<TextSnippet story="CustomRender" />}
|
||||
code={`<Text render={<span />}>Custom render</Text>`}
|
||||
/>
|
||||
|
||||
### Responsive
|
||||
|
||||
You can also use the `variant` prop to change the appearance of the text based
|
||||
|
||||
@@ -515,7 +515,7 @@
|
||||
}
|
||||
|
||||
.canon-Heading[data-variant="title4"] {
|
||||
font-size: var(--canon-font-size-title4);
|
||||
font-size: var(--canon-font-size-6);
|
||||
font-weight: var(--canon-font-weight-bold);
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
}
|
||||
|
||||
.canon-Heading[data-variant="title4"] {
|
||||
font-size: var(--canon-font-size-title4);
|
||||
font-size: var(--canon-font-size-6);
|
||||
font-weight: var(--canon-font-weight-bold);
|
||||
}
|
||||
|
||||
|
||||
@@ -9739,7 +9739,7 @@
|
||||
}
|
||||
|
||||
.canon-Heading[data-variant="title4"] {
|
||||
font-size: var(--canon-font-size-title4);
|
||||
font-size: var(--canon-font-size-6);
|
||||
font-weight: var(--canon-font-weight-bold);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,7 @@ export const AllVariants: Story = {
|
||||
<Heading variant="title2">Title 2</Heading>
|
||||
<Heading variant="title3">Title 3</Heading>
|
||||
<Heading variant="title4">Title 4</Heading>
|
||||
<Heading variant="title5">Title 5</Heading>
|
||||
</Flex>
|
||||
),
|
||||
};
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
}
|
||||
|
||||
.canon-Heading[data-variant='title4'] {
|
||||
font-size: var(--canon-font-size-title4);
|
||||
font-size: var(--canon-font-size-6);
|
||||
font-weight: var(--canon-font-weight-bold);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user