diff --git a/packages/eds-core-react/src/components/Dialog/DialogHeader.tsx b/packages/eds-core-react/src/components/Dialog/DialogHeader.tsx index 07a3e4853f..1dcbade27d 100644 --- a/packages/eds-core-react/src/components/Dialog/DialogHeader.tsx +++ b/packages/eds-core-react/src/components/Dialog/DialogHeader.tsx @@ -8,7 +8,7 @@ const StyledDialogHeader = styled.div(({ theme }) => { return css` display: flex; justify-content: space-betweene; - algin-items: center; + align-items: center; padding: ${theme.entities.children.spacings.top} ${theme.entities.children.spacings.right} 0 ${theme.entities.children.spacings.left}; diff --git a/packages/eds-core-react/src/components/Typography/Typography.docs.mdx b/packages/eds-core-react/src/components/Typography/Typography.docs.mdx index e6aae4100b..4dd21a74e9 100644 --- a/packages/eds-core-react/src/components/Typography/Typography.docs.mdx +++ b/packages/eds-core-react/src/components/Typography/Typography.docs.mdx @@ -1,4 +1,4 @@ -import { Links, PropsTable, Story } from './../../../.storybook/components' +import { Links, PropsTable, Story, Stack, TypographyGroups } from './../../../.storybook/components' import { Typography } from '.' # Typography @@ -39,12 +39,22 @@ Please do not use light in digital interfaces except in special cas
  • To ensure readability, line length should be 55-80 characters.
  • + ```tsx import { Typography } from '@equinor/eds-core-react' Sample text ``` +## Overview + +Typography groups with included varints: + +Example: ``.
    +Variants under `heading` and `paragraph` don’t require the group parameter. + + + ## Examples ### Colors diff --git a/packages/eds-core-react/src/components/Typography/Typography.stories.tsx b/packages/eds-core-react/src/components/Typography/Typography.stories.tsx index 3a930de9f2..f0dfa5f485 100644 --- a/packages/eds-core-react/src/components/Typography/Typography.stories.tsx +++ b/packages/eds-core-react/src/components/Typography/Typography.stories.tsx @@ -1,17 +1,23 @@ -import { Typography, TypographyProps, List } from '../..' +import { Card, Divider, Typography, TypographyProps } from '../..' import styled from 'styled-components' import { Story, ComponentMeta } from '@storybook/react' import { Stack } from './../../../.storybook/components' import page from './Typography.docs.mdx' +import { tokens, Typography as TypographyType } from '@equinor/eds-tokens' -const Wrapper = styled.div` - margin: 32px; -` +const { + colors: { + infographic: { + primary__moss_green_100: { rgba: mossgreen100 }, + }, + }, + typography, +} = tokens -const Grid = styled(Wrapper)` - display: grid; - grid-gap: 32px; - justify-items: start; +const SBCard = styled(Card)` + border: 1px solid ${mossgreen100}; + max-width: 290px; + display: table-cell; ` export default { @@ -36,207 +42,38 @@ export default { ], } as ComponentMeta -export const Introduction: Story = (args) => { - return Sample text +export const GroupsOverview = () => { + return Object.entries(typography).map(([key, group]) => ( + + + + {key} + + + + {Object.entries(group).map(([key, token]) => ( + + {key} + + ))} + + )) } - -export const Headings: Story = () => ( - - - Heading 1 bold - - Heading 1 - Heading 2 - Heading 3 - Heading 4 - Heading 5 - Heading 6 - -) - -export const Paragraphs = (): JSX.Element => ( - - - Body short link - - Body short - - Body short italic - - - Body short bold - - - Body short bold italic - - - Body long link - - Body long - - Body long italic - - - Body long bold - - - - Body long bold italic - - Overline - Ingress - Caption - Meta - -) - -export const GroupsOverview = (): JSX.Element => ( - - - input - - - - label - - - - - text - - - - - text_monospaced - - - - - helper - - - - - - navigation - - - - menu_title - - - - - menu_title_hover - - - - - menu_tabs - - - - - label - - - - - drawer_active - - - - - drawer_inactive - - - - - button - - - - - breadcrumb - - - - - breadcrumb_hover - - - - - - table - - - - cell_header - - - - - cell_text - - - - - cell_text_bold - - - - - cell_text_link - - - - - cell_numeric_monospaced - - - - - - ui - - - - tooltip - - - - - snackbar - - - - - accordion_header - - - - - chip__badge - - - - - chart - - - - - -) -GroupsOverview.parameters = { - docs: { - storyDescription: - 'Variants ordered by their required group parameter. Example ``. Variants under `heading` and `paragraph` don’t require the group parameter and are therefore not included here.', +GroupsOverview.decorators = [ + (Story) => { + return ( + + + + ) }, +] + +export const Introduction: Story = (args) => { + return Sample text } -export const Colors = (): JSX.Element => ( +export const Colors: Story = () => ( <> Primary Secondary @@ -249,7 +86,7 @@ export const Colors = (): JSX.Element => ( ) -export const Custom = (): JSX.Element => ( +export const Custom: Story = () => ( <>
    @@ -300,7 +137,7 @@ export const Custom = (): JSX.Element => ( ) -export const Lines = (): JSX.Element => ( +export const Lines: Story = () => ( <> Cupcake ipsum dolor sit amet caramels powder. Chocolate powder donut