Skip to content

Commit 6c98311

Browse files
committed
Merge branch 'improvement/storybook-migration' into q/1.0
2 parents 921f636 + 035f463 commit 6c98311

59 files changed

Lines changed: 661 additions & 1207 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.storybook/main.ts

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,23 @@
11
import type { StorybookConfig } from '@storybook/react-webpack5';
2+
import remarkGfm from 'remark-gfm';
3+
24
const config: StorybookConfig = {
35
stories: ['../stories/**/*.@(mdx|stories.@(ts|tsx))'],
46
staticDirs: ['./public'],
57

68
addons: [
7-
'@storybook/addon-essentials',
8-
'@storybook/addon-mdx-gfm',
9-
'@storybook/addon-storysource',
109
'@storybook/addon-webpack5-compiler-swc',
11-
'@chromatic-com/storybook',
12-
],
13-
swc: (config, options) => ({
14-
jsc: {
15-
transform: {
16-
react: {
17-
runtime: 'automatic',
10+
{
11+
name: '@storybook/addon-docs',
12+
options: {
13+
mdxPluginOptions: {
14+
mdxCompileOptions: {
15+
remarkPlugins: [remarkGfm],
16+
},
1817
},
1918
},
2019
},
21-
}),
22-
23-
webpackFinal: async (config, { configType }) => {
24-
// Resolve error when webpack-ing storybook:
25-
// Can't import the named export 'Children' from non EcmaScript module (only
26-
// default export is available)
27-
config.module?.rules?.push({
28-
test: /\.mjs$/,
29-
include: /node_modules/,
30-
type: 'javascript/auto',
31-
});
32-
33-
return config;
34-
},
35-
20+
],
3621
framework: {
3722
name: '@storybook/react-webpack5',
3823
options: {},

.storybook/manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { addons } from '@storybook/manager-api';
1+
import { addons } from 'storybook/manager-api';
22
import Theme from './theme.storybook';
33

44
addons.setConfig({
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ export const parameters = {
6464
layout: 'fullscreen',
6565
docs: {
6666
toc: { headingSelector: 'h2,h3', title: 'Table of Contents' },
67+
codePanel: true
6768
},
6869
controls: {
6970
//All props with color in name will automatically have a control 'color'

.storybook/theme.storybook.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { create } from '@storybook/theming';
1+
import { create } from 'storybook/theming';
22

33
export default create({
44
base: 'dark',

0 commit comments

Comments
 (0)