mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 18:31:08 +08:00
Module format: use story field for name/parameters annotation
This commit is contained in:
parent
41e86d8f7c
commit
ee199f6ab1
@ -323,9 +323,9 @@ export default function start(render, { decorateStory } = {}) {
|
||||
|
||||
Object.keys(exports).forEach(key => {
|
||||
if (isExportStory(key, meta)) {
|
||||
const story = exports[key];
|
||||
const { title = story.title || key, parameters } = story;
|
||||
kind.add(title, story, parameters);
|
||||
const storyFn = exports[key];
|
||||
const { name, parameters } = storyFn.story || {};
|
||||
kind.add(name || key, storyFn, parameters);
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user