Skip to content

Commit cd1cd01

Browse files
committed
fix(storybook): fix storybook break change
1 parent b75a037 commit cd1cd01

File tree

3 files changed

+4997
-4785
lines changed

3 files changed

+4997
-4785
lines changed

package.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,21 @@
3535
"react-dom": ">=16.0.0"
3636
},
3737
"devDependencies": {
38-
"@babel/core": "^7.4.5",
39-
"@babel/plugin-proposal-class-properties": "^7.4.4",
40-
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
41-
"@babel/preset-env": "^7.4.5",
42-
"@babel/preset-typescript": "^7.3.3",
43-
"@storybook/addon-a11y": "^5.1.1",
44-
"@storybook/addon-actions": "^5.1.1",
45-
"@storybook/addon-info": "^5.1.1",
46-
"@storybook/addon-links": "^5.1.1",
47-
"@storybook/addons": "^5.1.1",
48-
"@storybook/react": "^5.1.1",
38+
"@babel/core": "^7.6.3",
39+
"@babel/plugin-proposal-class-properties": "^7.5.5",
40+
"@babel/plugin-proposal-object-rest-spread": "^7.6.2",
41+
"@babel/preset-env": "^7.6.3",
42+
"@babel/preset-typescript": "^7.6.0",
43+
"@storybook/addon-a11y": "^5.2.3",
44+
"@storybook/addon-actions": "^5.2.3",
45+
"@storybook/addon-info": "^5.2.3",
46+
"@storybook/addon-links": "^5.2.3",
47+
"@storybook/addons": "^5.2.3",
48+
"@storybook/react": "^5.2.3",
4949
"@svgr/rollup": "^4.2.0",
50-
"@types/jest": "^24.0.12",
50+
"@types/jest": "^24.0.18",
5151
"@types/react-dom": "^16.9.1",
5252
"@types/react": "^16.9.1",
53-
"@types/storybook__addon-a11y": "^5.0.0",
54-
"@types/storybook__addon-actions": "^3.4.3",
5553
"@types/storybook__react": "^4.0.2",
5654
"babel-loader": "^8.0.5",
5755
"commitizen": "^4.0.0",

stories/index.stories.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
import { withA11y } from "@storybook/addon-a11y";
2-
import { storiesOf, StoryDecorator } from "@storybook/react";
2+
import { addDecorator, storiesOf } from "@storybook/react";
33
import React, { useEffect, useState } from "react";
44

55
import { ReactPictureAnnotation } from "../src";
66
import { IAnnotation } from "../src/Annotation";
77
import { IShapeData } from "../src/Shape";
88

9-
const CenterDecorator: StoryDecorator = storyFn => <div>{storyFn()}</div>;
9+
addDecorator(storyFn => <div>{storyFn()}</div>);
1010

1111
storiesOf("Hello World", module)
1212
.addDecorator(withA11y)
13-
.addDecorator(CenterDecorator)
1413
.add("with text", () => {
1514
const AnnotationComponent = () => {
1615
const [size, setSize] = useState({

0 commit comments

Comments
 (0)