Skip to content

Commit

Permalink
chore: update to storybook 7
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjm committed Aug 9, 2023
1 parent afe8971 commit a4adf9c
Show file tree
Hide file tree
Showing 7 changed files with 29,940 additions and 29,309 deletions.
21 changes: 12 additions & 9 deletions .storybook/main.cjs → .storybook/main.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { mergeConfig } = require('vite')
const svgLoader = require('vite-svg-loader')
import { mergeConfig } from 'vite'
import svgLoader from 'vite-svg-loader'

module.exports = {
export default {
async viteFinal(config) {
// return the customized config
return mergeConfig(config, {
Expand All @@ -16,16 +16,19 @@ module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: [
{
name: '@storybook/addon-postcss',
name: '@storybook/addon-styling',
options: {
postcssLoaderOptions: {
implementation: require('postcss')
}
postCss: true
}
},
'@storybook/addon-links',
'@storybook/addon-essentials'
],
core: { builder: '@storybook/builder-vite' },
framework: '@storybook/vue3'
framework: {
name: '@storybook/vue3-vite',
options: {}
},
docs: {
autodocs: true
}
}
6 changes: 6 additions & 0 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/manager-api'
import { themes } from '@storybook/theming'

addons.setConfig({
theme: themes.light
})
17 changes: 0 additions & 17 deletions .storybook/preview.cjs

This file was deleted.

19 changes: 19 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import '../tailwind/index.css'

export default {
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/
}
},
options: {
storySort: {
order: ['Guide', 'Primitives', ['Spacing', 'Colors', 'Typography'], 'Components'],
method: 'alphabetical'
}
}
}
}
Loading

0 comments on commit a4adf9c

Please sign in to comment.