mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-01 05:05:25 +08:00
Merge pull request #10016 from storybookjs/upgrade/reach-router-9705
Upgrade/reach router 9705
This commit is contained in:
commit
e879b9ec12
@ -26,7 +26,7 @@ const Icon = styled(Icons)({
|
||||
marginRight: 4,
|
||||
});
|
||||
|
||||
const RotatingIcon = styled(Icon)(({ theme }) => ({
|
||||
const RotatingIcon = styled(Icon)<{}>(({ theme }) => ({
|
||||
animation: `${theme.animation.rotate360} 1s linear infinite;`,
|
||||
}));
|
||||
|
||||
|
@ -14,6 +14,7 @@ React.createElement(\\"button\\", {
|
||||
Button.__docgenInfo = {
|
||||
\\"description\\": \\"\\",
|
||||
\\"methods\\": [],
|
||||
\\"displayName\\": \\"Button\\",
|
||||
\\"props\\": {
|
||||
\\"disabled\\": {
|
||||
\\"defaultValue\\": {
|
||||
|
@ -24,6 +24,7 @@ interface ParsingResult<T> {
|
||||
}
|
||||
|
||||
const ACORN_WALK_VISITORS = {
|
||||
// @ts-ignore
|
||||
...acornWalk.base,
|
||||
JSXElement: () => {},
|
||||
};
|
||||
@ -43,6 +44,7 @@ function calculateNodeDepth(node: estree.Expression): number {
|
||||
const depths: number[] = [];
|
||||
|
||||
acornWalk.ancestor(
|
||||
// @ts-ignore
|
||||
node,
|
||||
{
|
||||
ObjectExpression(_: any, ancestors: estree.Node[]) {
|
||||
@ -82,6 +84,7 @@ function parseFunction(
|
||||
|
||||
// If there is at least a JSXElement in the body of the function, then it's a React component.
|
||||
acornWalk.simple(
|
||||
// @ts-ignore
|
||||
funcNode.body,
|
||||
{
|
||||
JSXElement(node: any) {
|
||||
@ -117,6 +120,7 @@ function parseClass(
|
||||
|
||||
// If there is at least a JSXElement in the body of the class, then it's a React component.
|
||||
acornWalk.simple(
|
||||
// @ts-ignore
|
||||
classNode.body,
|
||||
{
|
||||
JSXElement(node: any) {
|
||||
|
@ -58,7 +58,9 @@ export const StoryPanel: React.FC<StoryPanelProps> = ({ api }) => {
|
||||
if (story) {
|
||||
const {
|
||||
parameters: {
|
||||
// @ts-ignore
|
||||
mdxSource = '',
|
||||
// @ts-ignore
|
||||
storySource: { source, locationsMap } = { source: '', locationsMap: {} },
|
||||
} = {},
|
||||
} = story;
|
||||
|
@ -57,7 +57,7 @@
|
||||
"webpack": "^4.33.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/client-api": "6.0.0-alpha.15",
|
||||
"@storybook/client-api": "6.0.0-alpha.20",
|
||||
"@types/mini-css-extract-plugin": "^0.9.0",
|
||||
"@types/node": "^13.5.3",
|
||||
"@types/webpack": "^4.41.0"
|
||||
|
@ -39,7 +39,7 @@
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@reach/router": "^1.2.1",
|
||||
"@reach/router": "^1.3.3",
|
||||
"@types/util-deprecate": "^1.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -27,7 +27,7 @@
|
||||
"prepare": "node ./scripts/generateVersion.js && node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@reach/router": "^1.2.1",
|
||||
"@reach/router": "^1.3.3",
|
||||
"@storybook/channels": "6.0.0-alpha.20",
|
||||
"@storybook/client-logger": "6.0.0-alpha.20",
|
||||
"@storybook/core-events": "6.0.0-alpha.20",
|
||||
|
@ -28,7 +28,7 @@
|
||||
"prepare": "node ../../scripts/prepare.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@reach/router": "^1.2.1",
|
||||
"@reach/router": "^1.3.3",
|
||||
"@storybook/csf": "0.0.1",
|
||||
"@types/reach__router": "^1.2.3",
|
||||
"core-js": "^3.0.1",
|
||||
|
Loading…
x
Reference in New Issue
Block a user