mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 16:51:09 +08:00
Addon-docs: Don't show stories heading when there are no stories
This commit is contained in:
parent
3d804cd2cc
commit
0efb742947
@ -17,7 +17,7 @@ export const Stories: FunctionComponent<StoriesProps> = ({ slot, title }) => {
|
||||
const stories: DocsStoryProps[] = slot
|
||||
? slot(componentStories, context)
|
||||
: componentStories && componentStories.slice(1);
|
||||
if (!stories) {
|
||||
if (!stories || stories.length === 0) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
|
Loading…
x
Reference in New Issue
Block a user