Skip to content

Commit

Permalink
build(storybook): update storybook to v8
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickcate committed Nov 12, 2024
1 parent b764b9d commit 384e7f7
Show file tree
Hide file tree
Showing 110 changed files with 25,078 additions and 43,970 deletions.
28 changes: 0 additions & 28 deletions .storybook/main.cjs

This file was deleted.

40 changes: 40 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import path from 'node:path'
import { loadConfigFromFile, mergeConfig } from 'vite'

export default {
stories: [
'../docs/**/*.mdx',
'../stories/**/*.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)',
],

addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-mdx-gfm',
],

core: {
disableTelemetry: true,
},

framework: {
name: '@storybook/vue3-vite',
options: {
docgen: 'vue-component-meta',
},
},

async viteFinal(config, { configType }) {
const { config: userConfig } = await loadConfigFromFile(
path.resolve(__dirname, '..', 'vite.config.js'),
)
return mergeConfig(config, {
...userConfig,
base: '/vue-uswds/',
// manually specify plugins to avoid conflict
plugins: [],
})
},
docs: {},
}
2 changes: 1 addition & 1 deletion .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { addons } from '@storybook/addons'
import { addons } from '@storybook/manager-api'
import theme from './theme.js'

addons.setConfig({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from '@storybook/addon-docs'
import { Meta } from '@storybook/blocks'

<Meta title='Guide/Installation' />

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Meta } from '@storybook/addon-docs'
import { Meta } from '@storybook/blocks'

<Meta title='Guide/Usage' />
<Meta title="Guide/Usage" />

# Usage

When importing the library via NPM you can import all components or use the _À La Carte_ method to import only specific components. The _À La Carte_ method makes it easier to reduce the final bundle size of your application by only including components you are using.
When importing the library via NPM you can import all components or use the *À La Carte* method to import only specific components. The *À La Carte* method makes it easier to reduce the final bundle size of your application by only including components you are using.

## All Components

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Meta } from '@storybook/addon-docs'
import { Meta } from '@storybook/blocks'

<Meta title='Guide/Configuration' />
<Meta title="Guide/Configuration" />

# Configuration

Expand Down
Loading

0 comments on commit 384e7f7

Please sign in to comment.