Skip to content
This repository was archived by the owner on Jan 31, 2024. It is now read-only.

Commit b684b87

Browse files
committed
Support Storybook 7.0
1 parent 3774b12 commit b684b87

File tree

3 files changed

+624
-3406
lines changed

3 files changed

+624
-3406
lines changed

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,10 @@
6161
"@auto-it/first-time-contributor": "^10.31.0",
6262
"@auto-it/released": "^10.31.0",
6363
"@size-limit/preset-small-lib": "^4.10.1",
64-
"@storybook/addons": "^6.4.0",
65-
"@storybook/client-api": "^6.4.0",
66-
"@storybook/react": "^6.4.0",
64+
"@storybook/addons": "next",
65+
"@storybook/store": "next",
66+
"@storybook/react": "next",
67+
"@storybook/types": "next",
6768
"auto": "^10.31.0",
6869
"concurrently": "^6.0.0",
6970
"husky": "^5.1.3",
@@ -75,7 +76,7 @@
7576
},
7677
"peerDependencies": {
7778
"@storybook/addons": ">=6.4.0",
78-
"@storybook/client-api": ">=6.4.0",
79+
"@storybook/store": ">=6.4.0",
7980
"@storybook/preview-web": ">=6.4.0",
8081
"@storybook/react": ">=6.4.0",
8182
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
@@ -96,6 +97,6 @@
9697
"onlyPublishWithReleaseLabel": true
9798
},
9899
"dependencies": {
99-
"@storybook/csf": "0.0.2--canary.87bc651.0"
100+
"@storybook/csf": "next"
100101
}
101102
}

src/index.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { defaultDecorateStory, combineParameters } from '@storybook/client-api';
1+
import { defaultDecorateStory, combineParameters } from '@storybook/store';
22
import addons, { applyHooks, HooksContext, mockChannel } from '@storybook/addons';
3-
import type { Meta, StoryContext, ReactFramework } from '@storybook/react';
4-
import { isExportStory } from '@storybook/csf'
3+
import type { Meta, ReactFramework } from '@storybook/react';
4+
import type { StoryContext } from '@storybook/types';
5+
import { isExportStory } from '@storybook/csf';
56

67
import type { GlobalConfig, StoriesWithPartialProps, StoryFile, TestingStory, TestingStoryPlayContext } from './types';
78
import { getStoryName, globalRender, isInvalidStory, objectEntries } from './utils';
@@ -228,4 +229,4 @@ export function composeStories<
228229
// @TODO: the inferred type of composedStories is correct but Partial.
229230
// investigate whether we can return an unpartial type of that without this hack
230231
return composedStories as unknown as Omit<StoriesWithPartialProps<TModule>, keyof StoryFile>;
231-
}
232+
}

0 commit comments

Comments
 (0)