diff --git a/frontend/src/app/main/ui/ds/foundations/heading.stories.jsx b/frontend/src/app/main/ui/ds/foundations/heading.stories.jsx index ac017b79f..67cdb3a98 100644 --- a/frontend/src/app/main/ui/ds/foundations/heading.stories.jsx +++ b/frontend/src/app/main/ui/ds/foundations/heading.stories.jsx @@ -1,54 +1,34 @@ import * as React from "react"; import Components from "@target/components"; +import { typographyIds } from "./typography.stories"; const { Heading } = Components; -const { StoryWrapper, StoryGridRow } = Components.storybook; +const { StoryWrapper } = Components.storybook; export default { - title: "Foundations/Heading", + title: "Foundations/Typography/Heading", component: Components.Heading, + argTypes: { + level: { + options: [1, 2, 3, 4, 5, 6], + control: { type: "select" }, + }, + typography: { + options: typographyIds, + control: { type: "select" }, + }, + }, }; -export const Levels = { - render: () => ( +export const AnyHeading = { + name: "Heading", + render: ({level, typography, ...args}) => ( - - - h1 / display - - - - - h2 / display - - - - - h3 / display - - - - ), -}; - -export const HeadingTypography = { - render: () => ( - - - - h1 / title-large - - - - - h1 / title-medium - - - - - h1 / code-font - - + Lorem ipsum ), + args: { + level: 1, + typography: "display", + } }; diff --git a/frontend/src/app/main/ui/ds/foundations/typography.stories.jsx b/frontend/src/app/main/ui/ds/foundations/typography.stories.jsx index 761a7076a..615d3729e 100644 --- a/frontend/src/app/main/ui/ds/foundations/typography.stories.jsx +++ b/frontend/src/app/main/ui/ds/foundations/typography.stories.jsx @@ -106,6 +106,8 @@ const typographyList = { }, }; +export const typographyIds = Object.values(typographyList).map(x => x.id); + export default { title: "Foundations/Typography", component: Components.StoryHeader,