-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joel Anton
committed
May 14, 2024
1 parent
8af5b56
commit 4fd92ee
Showing
6 changed files
with
1,368 additions
and
339 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,23 +1,19 @@ | ||
import { dirname, join } from 'path'; | ||
import { StorybookConfig } from '@storybook/react-vite'; | ||
|
||
export default { | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
|
||
addons: [getAbsolutePath('storybook-dark-mode'), getAbsolutePath('@storybook/addon-mdx-gfm')], | ||
addons: ['storybook-dark-mode', '@storybook/addon-controls'], | ||
|
||
framework: { | ||
name: '@storybook/react-vite', | ||
options: {}, | ||
}, | ||
|
||
docs: { | ||
autodocs: true, | ||
// TODO: re-enable docs when we decide how to incorporate them | ||
autodocs: false, | ||
}, | ||
|
||
staticDirs: ['./public'], | ||
} satisfies StorybookConfig; | ||
|
||
function getAbsolutePath(value) { | ||
return dirname(require.resolve(join(value, 'package.json'))); | ||
} |
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
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
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 |
---|---|---|
@@ -1,36 +1,28 @@ | ||
import { Meta } from '@storybook/react'; | ||
import React from 'react'; | ||
/* | ||
* import { Divider, Flex, styled } from '../../../styled-system/jsx'; | ||
* import { text, title } from '../../../styled-system/recipes'; | ||
*/ | ||
import { Divider, Flex, styled } from '../../../styled-system/jsx'; | ||
import { text, title } from '../../../styled-system/recipes'; | ||
|
||
/* | ||
* const Text = styled('p', text); | ||
* const Title = styled('h2', title); | ||
*/ | ||
const Text = styled('p', text); | ||
const Title = styled('h2', title); | ||
|
||
export default { | ||
title: 'Panda/Components/Typography', | ||
// component: Text, | ||
component: Text, | ||
argTypes: {}, | ||
}; | ||
// } as Meta<typeof Text>; | ||
} as Meta<typeof Text>; | ||
|
||
export const all = () => ( | ||
/* | ||
* <Flex direction="column" gap="100"> | ||
* <Text>Default Body</Text> | ||
* <Text variant="main">Main text</Text> | ||
* <Text variant="secondary">Secondary text</Text> | ||
* <Text variant="strong">Strong text</Text> | ||
* <Text variant="mono">Mono text</Text> | ||
* <Divider /> | ||
* <Title>Default title</Title> | ||
* <Title variant="page">Page title</Title> | ||
* <Title variant="section">Section title</Title> | ||
* <Title variant="subsection">Subsection title</Title> | ||
* </Flex> | ||
*/ | ||
<div>Hello</div> | ||
<Flex direction="column" gap="100"> | ||
<Text>Default Body</Text> | ||
<Text variant="main">Main text</Text> | ||
<Text variant="secondary">Secondary text</Text> | ||
<Text variant="strong">Strong text</Text> | ||
<Text variant="mono">Mono text</Text> | ||
<Divider /> | ||
<Title>Default title</Title> | ||
<Title variant="page">Page title</Title> | ||
<Title variant="section">Section title</Title> | ||
<Title variant="subsection">Subsection title</Title> | ||
</Flex> | ||
); |
Oops, something went wrong.