Skip to content

Commit

Permalink
feat: add readme as storybook home
Browse files Browse the repository at this point in the history
  • Loading branch information
bbtgnn committed Jul 22, 2024
1 parent d0b00ad commit e29c3c9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { StorybookConfig } from '@storybook/html-vite';

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions',
"@saucelabs/storybook-variants"
stories: ['../src/home/home.mdx', '../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions',
'@saucelabs/storybook-variants',
],
framework: '@storybook/html-vite',
staticDirs: ['../dist'],
Expand All @@ -17,4 +21,5 @@ const config: StorybookConfig = {
autodocs: true,
},
};

export default config;
9 changes: 9 additions & 0 deletions src/home/home.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { Meta, Markdown } from '@storybook/blocks';
import README from '../../README.md?raw';

<Meta title="Welcome!" />

<div>
<h1>Ciao</h1>
<Markdown>{README}</Markdown>
</div>

0 comments on commit e29c3c9

Please sign in to comment.