mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-06 07:21:16 +08:00
Rename example => story
This commit is contained in:
parent
2dd97ad0a8
commit
c546d4d516
@ -283,7 +283,7 @@ export default function start(render, { decorateStory } = {}) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const { default: meta, ...examples } = fileExports;
|
const { default: meta, ...stories } = fileExports;
|
||||||
const kindName = meta.title;
|
const kindName = meta.title;
|
||||||
|
|
||||||
if (previousExports[filename]) {
|
if (previousExports[filename]) {
|
||||||
@ -307,10 +307,10 @@ export default function start(render, { decorateStory } = {}) {
|
|||||||
kind.addParameters(meta.parameters);
|
kind.addParameters(meta.parameters);
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.keys(examples).forEach(key => {
|
Object.keys(stories).forEach(key => {
|
||||||
const example = examples[key];
|
const story = stories[key];
|
||||||
const { title = example.title || key, parameters } = example;
|
const { title = story.title || key, parameters } = story;
|
||||||
kind.add(title, example, parameters);
|
kind.add(title, story, parameters);
|
||||||
});
|
});
|
||||||
|
|
||||||
previousExports[filename] = fileExports;
|
previousExports[filename] = fileExports;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user