-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add typography presets and examples to Storybook
- Loading branch information
1 parent
cc58a40
commit c64629d
Showing
3 changed files
with
85 additions
and
323 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
libs/@guardian/source-foundations/src/typography/storybookTypeSpecimen.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { css } from '@emotion/react'; | ||
import * as presets from './presets'; | ||
import { space } from '../space/space'; | ||
import { palette } from '../colour/palette'; | ||
|
||
const listCss = css` | ||
list-style: none; | ||
padding: 0; | ||
li + li { | ||
margin-top: ${space[4]}px; | ||
padding-top: ${space[4]}px; | ||
border-top: 1px solid ${palette.neutral[86]}; | ||
} | ||
`; | ||
|
||
export const TypographyPresets = () => ( | ||
<ul css={listCss}> | ||
{Object.entries(presets).map(([preset, styles]) => ( | ||
<li> | ||
<span | ||
css={css` | ||
display: block; | ||
`} | ||
> | ||
{preset} | ||
</span> | ||
<span | ||
css={css` | ||
${styles} | ||
`} | ||
> | ||
For facts' sake | ||
</span> | ||
</li> | ||
))} | ||
</ul> | ||
); |
122 changes: 0 additions & 122 deletions
122
libs/@guardian/source-foundations/src/typography/storybookTypographyRenderers.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.