diff --git a/frontend/src/app/main/ui/ds/foundations/typography/heading.mdx b/frontend/src/app/main/ui/ds/foundations/typography/heading.mdx index ffda6ede4..eedee85f2 100644 --- a/frontend/src/app/main/ui/ds/foundations/typography/heading.mdx +++ b/frontend/src/app/main/ui/ds/foundations/typography/heading.mdx @@ -5,19 +5,14 @@ import * as HeadingStories from "./heading.stories"; # Headings -This component will add a heading tag element to our code. +This component will add a heading tag element (ie. `

`, `

`, etc.) to our code. ## Technical notes -This components accepts to props: - -- `level` (default value: `1`) : A number from `1` to `6`, to set the heading level (i.e. `

`, `

`, etc.). -- `typography` (mandatory): Any of the [supported typography IDs](?path=/docs/foundations-typography--docs). - -You can check passed props to renderized components on hover `level / typography`; - ### Using typography IDs +This component accepts any [typography IDs](?path=/docs/foundations-typography--docs). + There are typography ID definitions you can use in your code rather than typing the typography ID by hand. diff --git a/frontend/src/app/main/ui/ds/foundations/typography/heading.stories.jsx b/frontend/src/app/main/ui/ds/foundations/typography/heading.stories.jsx index 30e592e88..7db98e008 100644 --- a/frontend/src/app/main/ui/ds/foundations/typography/heading.stories.jsx +++ b/frontend/src/app/main/ui/ds/foundations/typography/heading.stories.jsx @@ -20,17 +20,28 @@ export default { control: { type: "select" }, }, }, + parameters: { + controls: { exclude: ["children", "theme", "style"] }, + backgrounds: { default: "light" }, + }, + args: { + children: "Lorem ipsum", + theme: "light", + style: { + color: "var(--color-foreground-primary)", + background: "var(--color-background-primary)", + }, + }, + render: ({ style, children, theme, ...args }) => ( + // TODO: this
is a hack until we have proper theming +
+ {children} +
+ ), }; export const AnyHeading = { name: "Heading", - render: ({ level, typography, ...args }) => ( - - - Lorem ipsum - - - ), args: { level: 1, typography: "display",