generated from nl-design-system/example
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Storybook to v8. Remove incompatible addons (@etchteam/storybook-addon-status) and its configuration. Simplify config: - Move the decorator to its own .tsx file and rename main.tsx and preview.tsx to main.ts and preview.ts respectively - Add types Rename *.stories.mdx -> *.mdx as this is now required for Storybook 8. Remove unused vite.config.ts Remove unused dependencies. Remove Storybook deps from .ncurc.major.cjs
- Loading branch information
Showing
14 changed files
with
946 additions
and
1,827 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import type { Decorator } from '@storybook/react'; | ||
|
||
export const ParameterArgsDecorator: Decorator = (Story, context) => { | ||
// Hack to make current args for a story available in the transformSource of the docs addon | ||
context.parameters['args'] = context.args; | ||
|
||
return ( | ||
<div className="voorbeeld-theme"> | ||
<Story /> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import type { StorybookConfig } from '@storybook/react-vite'; | ||
|
||
const config: StorybookConfig = { | ||
stories: ['../src/**/*stories.@(js|jsx|ts|tsx)', '../src/**/*.mdx'], | ||
addons: [ | ||
'@storybook/addon-a11y', | ||
'@storybook/addon-actions', | ||
'@storybook/addon-docs', | ||
'@storybook/addon-interactions', | ||
'@storybook/addon-links', | ||
'@storybook/addon-viewport', | ||
], | ||
framework: { | ||
name: '@storybook/react-vite', | ||
options: {}, | ||
}, | ||
core: { | ||
disableTelemetry: true, | ||
disableWhatsNewNotifications: true, | ||
}, | ||
docs: { | ||
autodocs: true, | ||
}, | ||
staticDirs: ['../../../proprietary/assets/src'], | ||
}; | ||
|
||
export default config; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// import '@nl-design-system-unstable/voorbeeld-design-tokens/src/font.js'; | ||
import { defineCustomElements } from '@kernteam/web-components-stencil/loader/index.js'; | ||
import '@nl-design-system-unstable/voorbeeld-design-tokens/dist/index.css'; | ||
import type { Preview } from '@storybook/react'; | ||
import { ParameterArgsDecorator } from './ParameterArgsDecorator'; | ||
|
||
defineCustomElements(); | ||
|
||
const preview: Preview = { | ||
decorators: [ParameterArgsDecorator], | ||
parameters: { | ||
controls: { expanded: false }, | ||
options: { | ||
panelPosition: 'right', | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...book/src/documentation/notice.stories.mdx → ...es/storybook/src/documentation/notice.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.