Skip to content

Commit

Permalink
fix: story names
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Mar 31, 2020
1 parent 19486ce commit 0d90f10
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion core/loader/src/story-store-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ const loadStoryStore = (): StoriesStore | undefined => {
kind.stories = [];
}
kind.stories.push(id);
globalStore.stories[id] = { ...story, id, kind: kind.title };
globalStore.stories[id] = {
...story,
name: storyNameFromExport(story.name),
id,
kind: kind.title,
};
}
});
Object.keys(store.components).forEach(key => {
Expand Down
1 change: 1 addition & 0 deletions examples/storybook-5/.storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { ControlsTable, Title, Subtitle, Story, Stories, Description, StorySourc
addDecorator((story, ctx ) => {
return (
<ThemeProvider>
{console.log(ctx)}
{story(ctx)}
</ThemeProvider>
);
Expand Down
1 change: 0 additions & 1 deletion ui/blocks/src/Stories/Stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
StoryBlockContainer,
StoryBlockContainerProps,
} from '../BlockContainer/story';
import { getStoryTitle } from '../utils';
import { Playground, PlaygroundProps } from '../Playground';
import { Story as StoryComponent } from '../Story';

Expand Down

0 comments on commit 0d90f10

Please sign in to comment.