diff --git a/src/components/base/Text.js b/src/components/base/Text/index.js similarity index 100% rename from src/components/base/Text.js rename to src/components/base/Text/index.js diff --git a/src/components/base/Text/stories.js b/src/components/base/Text/stories.js new file mode 100644 index 00000000..041e1611 --- /dev/null +++ b/src/components/base/Text/stories.js @@ -0,0 +1,63 @@ +// @flow + +import React from 'react' +import map from 'lodash/map' +import { storiesOf } from '@storybook/react' + +import Box from 'components/base/Box' +import Text from 'components/base/Text' + +import { fontFamilies, fontSizes } from 'styles/theme' + +const stories = storiesOf('Text', module) + +const Title = ({ children }: { children: string }) => ( + + {children} + +) + +const FontStyles = () => ( + + {'Font styles'} + {map(fontFamilies, (weights, fontName) => ( + + {map(weights, (_, weight) => ( + + + + {fontName} {weight} + + + + {'The quick brown fox jumps over the lazy dog'} + + + ))} + + ))} + +) + +const FontSizes = () => ( + + {'Font sizes'} + + + {fontSizes.map((size, i) => ( + + + + + ))} + +
{i}{`${size}px`}
+
+) + +stories.add('all fonts styles', () => ( + + + + +))