-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: create typography * feat: move props top level Co-authored-by: Takeichi Kanzaki Cabrera <[email protected]>
- Loading branch information
Showing
9 changed files
with
756 additions
and
3 deletions.
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
packages/styled-components/src/components/primitives/Typography/Typography.stories.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,71 @@ | ||
import React from 'react'; | ||
import { Typography } from '.'; | ||
import { select } from '@storybook/addon-knobs'; | ||
|
||
export default { | ||
title: 'Primitives/Typography', | ||
component: Typography, | ||
}; | ||
|
||
export const Types = () => ( | ||
<> | ||
<h1>Typography types</h1> | ||
{Object.keys(Typography.Types).map((type: any) => ( | ||
<> | ||
<Typography type={Typography.Types[type]}>{type} Typography</Typography> | ||
<br /> | ||
</> | ||
))} | ||
</> | ||
); | ||
|
||
export const Intensities = () => ( | ||
<> | ||
<h1>Typography intensities</h1> | ||
{Object.keys(Typography.Intensities).map((intensity: any) => ( | ||
<> | ||
<Typography intensity={Typography.Intensities[intensity]}> | ||
{intensity} Typography | ||
</Typography> | ||
<br /> | ||
</> | ||
))} | ||
</> | ||
); | ||
|
||
export const Modes = () => ( | ||
<> | ||
<h1>Typography Modes</h1> | ||
{Object.keys(Typography.Modes).map((mode: any) => ( | ||
<> | ||
<Typography mode={Typography.Modes[mode]}>{mode} Typography</Typography> | ||
<br /> | ||
</> | ||
))} | ||
</> | ||
); | ||
|
||
export const Playground = () => ( | ||
<> | ||
<h1>Playground</h1> | ||
<Typography | ||
type={select( | ||
'Typography type', | ||
Typography.Types, | ||
Typography.Types.Headline1 | ||
)} | ||
mode={select( | ||
'Typography mode', | ||
Typography.Modes, | ||
Typography.Modes.Dark100 | ||
)} | ||
intensity={select( | ||
'Typography intensity', | ||
Typography.Intensities, | ||
Typography.Intensities.Regular | ||
)} | ||
> | ||
Playground | ||
</Typography> | ||
</> | ||
); |
Oops, something went wrong.