Skip to content

Commit

Permalink
create own typography showcase
Browse files Browse the repository at this point in the history
  • Loading branch information
r3dDoX committed Jun 9, 2024
1 parent 2ccd502 commit 835e6bd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
29 changes: 26 additions & 3 deletions web-components/src/rootStyles/design-tokens.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {Canvas, ColorItem, ColorPalette, Meta} from '@storybook/blocks';
import {ColorItem, ColorPalette, Meta} from '@storybook/blocks';
import tokens from './design-tokens.json';
import {groupColors} from './color.helper';
import * as TypographyStories from './typography.stories';

<Meta title="Design Tokens"/>

Expand Down Expand Up @@ -50,7 +49,31 @@ properties.

## Typography

<Canvas of={TypographyStories.Default}/>
**Typeface:** {tokens.typography.main.fontFamily.value}

<div style={{ display: 'grid', gridTemplateColumns: 'max-content auto', gap: tokens.size['2'].value, alignItems: 'center' }}>
{Object.entries(tokens.typography)
.map(([name, token]) => (
<div style={{ display: 'contents' }}>
<small>{name}</small>
<div
style={{
fontFamily: token.fontFamily.value,
fontSize: token.fontSize.value,
lineHeight: token.lineHeight.value,
fontWeight: token.fontWeight.value,
fontStretch: token.fontStretch.value,
letterSpacing: token.letterSpacing.value,
textDecorationStyle: token.textDecoration.value,
paragraphIndent: token.paragraphIndent.value,
}}
>
The quick brown fox jumps over the lazy dog
</div>
</div>
))
}
</div>

## Sizes

Expand Down
19 changes: 0 additions & 19 deletions web-components/src/rootStyles/typography.stories.ts

This file was deleted.

0 comments on commit 835e6bd

Please sign in to comment.