From d28c633c59fcac1365036f266b546a5d0551b15f Mon Sep 17 00:00:00 2001 From: Pavel Prichodko <14926950+prichodko@users.noreply.github.com> Date: Wed, 18 Jan 2023 16:42:41 +0100 Subject: [PATCH] add typography stories --- .../src/typography/typography.stories.tsx | 60 +++++++++++++++++++ .../components/src/typography/typography.tsx | 5 ++ 2 files changed, 65 insertions(+) create mode 100644 packages/components/src/typography/typography.stories.tsx diff --git a/packages/components/src/typography/typography.stories.tsx b/packages/components/src/typography/typography.stories.tsx new file mode 100644 index 00000000..f645fced --- /dev/null +++ b/packages/components/src/typography/typography.stories.tsx @@ -0,0 +1,60 @@ +import { Stack } from '@tamagui/core' + +import { Code, Heading, Paragraph } from '.' + +import type { Meta, StoryObj } from '@storybook/react' + +const meta: Meta = { + title: 'typography', + argTypes: {}, +} + +export const HeadingStory: StoryObj = { + name: 'Heading', + args: { + children: 'The quick brown fox jumped over the lazy dog.', + }, + render: args => ( + + + + + + + + + ), +} + +export const TextStory: StoryObj = { + name: 'Text', + args: { + children: 'The quick brown fox jumped over the lazy dog.', + }, + render: args => ( + + + + + + + + + ), +} + +export const CodeStory: StoryObj = { + name: 'Code', + args: { + children: '// How to create variables:', + }, + render: () => ( + + + The quick brown fox jumped over the lazy dog. + + + ), +} + +export default meta diff --git a/packages/components/src/typography/typography.tsx b/packages/components/src/typography/typography.tsx index 23d929e6..21c5b0dc 100644 --- a/packages/components/src/typography/typography.tsx +++ b/packages/components/src/typography/typography.tsx @@ -60,6 +60,11 @@ export const Paragraph = styled(SizableText, { lineHeight: 18, letterSpacing: '-0.003em', }, + 11: { + fontSize: 11, + lineHeight: 18, + letterSpacing: '-0.003em', + }, }, uppercase: { true: {