Skip to content

Commit 01d5b4b

Browse files
committed
chore: v.2.10.0
1 parent 1cf996a commit 01d5b4b

File tree

4 files changed

+3036
-4590
lines changed

4 files changed

+3036
-4590
lines changed

.storybook/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
2-
32
module.exports = {
43
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
54
addons: [
@@ -21,7 +20,8 @@ module.exports = {
2120
config.resolve.plugins.push(new TsconfigPathsPlugin({}));
2221
return config;
2322
},
24-
core: {
25-
builder: 'webpack5',
23+
framework: {
24+
name: '@storybook/react-webpack5',
25+
options: {},
2626
},
2727
};

package.json

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "react-thumbnail-generator",
3-
"version": "2.9.5",
3+
"version": "2.10.0",
44
"description": "react-thumbnail-generator",
55
"main": "dist/index.js",
66
"module": "dist/index.js",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1",
99
"build": "rm -rf dist && rollup -c",
10-
"storybook": "start-storybook -p 6006 -s public",
11-
"build:storybook": "build-storybook",
10+
"storybook": "storybook dev -p 6006 -s public",
11+
"build:storybook": "storybook build",
1212
"deploy:storybook": "gh-pages -d storybook-static"
1313
},
1414
"repository": {
@@ -21,28 +21,26 @@
2121
"url": "https://github.com/ssi02014/react-thumbnail-generator.git/issues"
2222
},
2323
"homepage": "http://ssi02014.github.io/react-thumbnail-generator",
24-
"dependencies": {},
2524
"devDependencies": {
26-
"@babel/core": "^7.20.12",
27-
"@babel/preset-env": "^7.20.2",
28-
"@babel/preset-react": "^7.18.6",
29-
"@babel/preset-typescript": "^7.18.6",
30-
"@rollup/plugin-alias": "^4.0.3",
25+
"@babel/core": "^7.22.1",
26+
"@babel/preset-env": "^7.22.4",
27+
"@babel/preset-react": "^7.22.3",
28+
"@babel/preset-typescript": "^7.21.5",
29+
"@rollup/plugin-alias": "^5.0.0",
3130
"@rollup/plugin-babel": "^6.0.3",
32-
"@rollup/plugin-commonjs": "^24.0.1",
33-
"@rollup/plugin-node-resolve": "^15.0.1",
34-
"@rollup/plugin-terser": "^0.4.0",
35-
"@rollup/plugin-typescript": "^11.0.0",
36-
"@storybook/addon-actions": "^6.5.16",
37-
"@storybook/addon-essentials": "^6.5.16",
38-
"@storybook/addon-interactions": "^6.5.16",
39-
"@storybook/addon-links": "^6.5.16",
40-
"@storybook/builder-webpack5": "^6.5.16",
41-
"@storybook/manager-webpack5": "^6.5.16",
42-
"@storybook/node-logger": "^6.5.16",
43-
"@storybook/preset-create-react-app": "^4.1.2",
44-
"@storybook/react": "^6.5.16",
45-
"@storybook/testing-library": "^0.0.13",
31+
"@rollup/plugin-commonjs": "^25.0.0",
32+
"@rollup/plugin-node-resolve": "^15.1.0",
33+
"@rollup/plugin-terser": "^0.4.3",
34+
"@rollup/plugin-typescript": "^11.1.1",
35+
"@storybook/addon-actions": "^7.0.18",
36+
"@storybook/addon-essentials": "^7.0.18",
37+
"@storybook/addon-interactions": "^7.0.18",
38+
"@storybook/addon-links": "^7.0.18",
39+
"@storybook/node-logger": "^7.0.18",
40+
"@storybook/preset-create-react-app": "^7.0.18",
41+
"@storybook/react": "^7.0.18",
42+
"@storybook/react-webpack5": "^7.0.18",
43+
"@storybook/testing-library": "^0.1.0",
4644
"@types/node": "^18.13.0",
4745
"@types/react": "^18.0.28",
4846
"@types/react-dom": "^18.0.11",
@@ -54,19 +52,20 @@
5452
"eslint-config-prettier": "^8.6.0",
5553
"eslint-plugin-react": "^7.32.2",
5654
"eslint-plugin-react-hooks": "^4.6.0",
57-
"eslint-plugin-storybook": "^0.6.10",
55+
"eslint-plugin-storybook": "^0.6.12",
5856
"eslint-webpack-plugin": "^4.0.0",
5957
"gh-pages": "^5.0.0",
6058
"prettier": "^2.8.4",
6159
"react": "^18.2.0",
6260
"react-color-palette": "^6.2.0",
6361
"react-dom": "^18.2.0",
6462
"react-scripts": "^5.0.1",
65-
"rollup": "^3.17.2",
63+
"rollup": "^3.23.1",
6664
"rollup-plugin-peer-deps-external": "^2.2.4",
65+
"storybook": "^7.0.18",
6766
"styled-components": "^5.3.6",
6867
"tsconfig-paths-webpack-plugin": "^4.0.0",
69-
"typescript": "^4.9.5"
68+
"typescript": "^5.1.3"
7069
},
7170
"peerDependencies": {
7271
"react": ">=16.8.0",

src/stories/components/ThumbnailGenerator.stories.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { Story } from '@storybook/react/types-6-0';
2+
import { StoryFn } from '@storybook/react';
33
import ThumbnailGenerator from '@lib/ThumbnailGenerator';
44
import { Size } from '@utils/style';
55
import { toggleButton } from '@assets/icons';
@@ -30,7 +30,7 @@ interface Props {
3030
isFullWidth?: boolean;
3131
}
3232

33-
const Template: Story = ({
33+
const Template: StoryFn = ({
3434
modalPosition,
3535
iconPosition,
3636
iconSize,
@@ -48,12 +48,14 @@ const Template: Story = ({
4848
);
4949
};
5050

51-
export const Default = Template.bind({});
51+
export const Default = {
52+
render: Template,
5253

53-
Default.args = {
54-
iconSize: 'medium',
55-
buttonIcon: <img src={toggleButton} width={40} height={40} />,
56-
modalPosition: 'right',
57-
iconPosition: [0, 20, 20, 0],
58-
isFullWidth: false,
54+
args: {
55+
iconSize: 'medium',
56+
buttonIcon: <img src={toggleButton} width={40} height={40} />,
57+
modalPosition: 'right',
58+
iconPosition: [0, 20, 20, 0],
59+
isFullWidth: false,
60+
},
5961
};

0 commit comments

Comments
 (0)