mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 23:11:23 +08:00
Addon-docs: Hide stories block when there are no stories (#9271)
Addon-docs: Hide stories block when there are no stories
This commit is contained in:
commit
608cdbfe20
@ -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