Skip to content

Commit

Permalink
chore: update storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
dackmin committed Jun 4, 2024
1 parent 2d2e25e commit 4b674a0
Show file tree
Hide file tree
Showing 5 changed files with 1,573 additions and 2,391 deletions.
37 changes: 19 additions & 18 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import path from 'node:path';

import type { StorybookConfig } from '@storybook/react-webpack5';
import postcss from 'postcss';
import sass from 'sass';

const config: StorybookConfig = {
stories: [
Expand All @@ -11,26 +9,26 @@ const config: StorybookConfig = {
addons: [
'@storybook/addon-storysource',
'@storybook/addon-actions',
'@storybook/addon-themes',
{
name: '@storybook/addon-styling',
name: '@storybook/addon-styling-webpack',
options: {
postCss: {
implementation: postcss,
},
sass: {
implementation: sass,
},
rules: [
{
test: /\.sass$/,
use: [
'style-loader',
'css-loader',
'postcss-loader',
'sass-loader',
],
},
],
},
},
'@storybook/addon-webpack5-compiler-swc',
],
framework: {
name: '@storybook/react-webpack5',
options: {
builder: {
useSWC: true,
},
},
},
framework: '@storybook/react-webpack5',
webpackFinal: (config) => {
config.resolve = config.resolve || {};
config.resolve.alias = {
Expand Down Expand Up @@ -65,7 +63,10 @@ const config: StorybookConfig = {
jsx: true,
},
},
})
}),
typescript: {
reactDocgen: 'react-docgen-typescript',
},
};

export default config;
14 changes: 0 additions & 14 deletions .storybook/preview.js

This file was deleted.

16 changes: 1 addition & 15 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
import type { Preview } from "@storybook/react";

const preview: Preview = {
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
};

export default preview;
import './index.sass';
18 changes: 12 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
"@rollup/plugin-swc": "0.3.0",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "11.1.6",
"@storybook/addon-actions": "7.6.19",
"@storybook/addon-storysource": "7.6.19",
"@storybook/addon-styling": "1.3.7",
"@storybook/react": "7.6.19",
"@storybook/react-webpack5": "7.6.19",
"@storybook/addon-actions": "8.1.5",
"@storybook/addon-storysource": "8.1.5",
"@storybook/addon-styling-webpack": "1.0.0",
"@storybook/addon-themes": "8.1.5",
"@storybook/addon-webpack5-compiler-swc": "1.0.3",
"@storybook/react": "8.1.5",
"@storybook/react-webpack5": "8.1.5",
"@swc/core": "1.5.24",
"@swc/jest": "0.2.36",
"@testing-library/jest-dom": "6.4.5",
Expand All @@ -40,6 +42,7 @@
"@typescript-eslint/parser": "7.11.0",
"autoprefixer": "10.4.19",
"babel-jest": "29.7.0",
"css-loader": "7.1.2",
"d3": "7.9.0",
"eslint": "8.57.0",
"eslint-config-standard": "17.1.0",
Expand All @@ -53,13 +56,16 @@
"jest-environment-jsdom": "29.7.0",
"lerna": "8.1.3",
"postcss": "8.4.38",
"postcss-loader": "8.1.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"rollup": "4.18.0",
"rollup-plugin-dts": "6.1.1",
"sass": "1.77.4",
"storybook": "7.6.19",
"sass-loader": "14.2.1",
"storybook": "8.1.5",
"storybook-addon-swc": "1.2.0",
"style-loader": "4.0.0",
"tailwindcss": "3.4.3",
"typescript": "5.4.5"
},
Expand Down
Loading

0 comments on commit 4b674a0

Please sign in to comment.