Skip to content

Commit

Permalink
feat(Storybook): migrate to SB 7 for Vite support
Browse files Browse the repository at this point in the history
  • Loading branch information
MellyGray committed Mar 3, 2023
1 parent 27a4b77 commit 871ae5d
Show file tree
Hide file tree
Showing 12 changed files with 18,925 additions and 21,434 deletions.
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
"@babel/preset-env",
"@babel/preset-typescript"
]
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# production
/dist

# storybook
/storybook-static

# misc
.DS_Store
.env.local
Expand Down
15 changes: 0 additions & 15 deletions .storybook/main.js

This file was deleted.

17 changes: 17 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import type { StorybookConfig } from '@storybook/react-vite'
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-interactions'
],
framework: {
name: '@storybook/react-vite',
options: {}
},
docs: {
autodocs: 'tag'
}
}
export default config
3 changes: 3 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script>
window.global = window;
</script>
17 changes: 0 additions & 17 deletions .storybook/preview.js

This file was deleted.

18 changes: 18 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import type { Preview } from '@storybook/react'

const preview: Preview = {
parameters: {
backgrounds: {
default: 'light'
},
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/
}
}
}
}

export default preview
23 changes: 0 additions & 23 deletions .storybook/test-runner.js

This file was deleted.

Loading

0 comments on commit 871ae5d

Please sign in to comment.