Skip to content

Commit 632d05e

Browse files
committed
stories: fix type signature
1 parent f73776f commit 632d05e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

static/app/stories/view/storyExports.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,18 @@ function StoryAPI() {
152152
const {story} = useStory();
153153
if (!story.exports.types) return null;
154154

155+
if (
156+
typeof story.exports.types === 'object' &&
157+
story.exports.types !== null &&
158+
'filename' in story.exports.types
159+
) {
160+
return (
161+
<Storybook.APIReference
162+
types={story.exports.types as TypeLoader.ComponentDocWithFilename}
163+
/>
164+
);
165+
}
166+
155167
return (
156168
<Fragment>
157169
{Object.entries(story.exports.types).map(([key, value]) => {

0 commit comments

Comments
 (0)