Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(storybook): update storybook to v8 #1050

Merged
merged 2 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading