mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 06:01:22 +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;
|
||||
|
||||
if (previousExports[filename]) {
|
||||
@ -307,10 +307,10 @@ export default function start(render, { decorateStory } = {}) {
|
||||
kind.addParameters(meta.parameters);
|
||||
}
|
||||
|
||||
Object.keys(examples).forEach(key => {
|
||||
const example = examples[key];
|
||||
const { title = example.title || key, parameters } = example;
|
||||
kind.add(title, example, parameters);
|
||||
Object.keys(stories).forEach(key => {
|
||||
const story = stories[key];
|
||||
const { title = story.title || key, parameters } = story;
|
||||
kind.add(title, story, parameters);
|
||||
});
|
||||
|
||||
previousExports[filename] = fileExports;
|
||||
|
Loading…
x
Reference in New Issue
Block a user