diff --git a/addons/docs/src/blocks/Story.tsx b/addons/docs/src/blocks/Story.tsx index 888d379c6ef4..6940fbe192b1 100644 --- a/addons/docs/src/blocks/Story.tsx +++ b/addons/docs/src/blocks/Story.tsx @@ -49,7 +49,7 @@ export const getStoryProps = ( return { inline: typeof inline === 'boolean' ? inline : inlineStories, id: previewId, - storyFn: data && data.getDecorated(), + storyFn: data && data.storyFn, height: height || iframeHeight, title: data && data.name, }; diff --git a/lib/client-api/src/story_store.ts b/lib/client-api/src/story_store.ts index d87183ef216a..b8468d9872f6 100644 --- a/lib/client-api/src/story_store.ts +++ b/lib/client-api/src/story_store.ts @@ -7,7 +7,7 @@ import { stripIndents } from 'common-tags'; import { Channel } from '@storybook/channels'; import Events from '@storybook/core-events'; import { logger } from '@storybook/client-logger'; -import { StoryContext, StoryFn, Parameters } from '@storybook/addons'; +import { StoryFn, Parameters } from '@storybook/addons'; import { DecoratorFunction, LegacyData, @@ -188,7 +188,7 @@ export default class StoryStore extends EventEmitter { applyDecorators(getOriginal(), getDecorators()) ); - const storyFn: StoryFn = (p: StoryContext) => + const storyFn: StoryFn = (p: object) => getDecorated()({ ...identification, parameters: { ...parameters, ...p } }); _data[id] = {