From 027b48eb04ac1ccbf8054cefbc1a0c86ffdc2905 Mon Sep 17 00:00:00 2001 From: Michael Shilman Date: Mon, 17 Jan 2022 19:41:36 +0800 Subject: [PATCH] Merge pull request #17256 from storybookjs/16895-fix-docs-disable Addon-docs: Fix `docs.disable` parameter on DocsPage --- addons/docs/src/blocks/Stories.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/docs/src/blocks/Stories.tsx b/addons/docs/src/blocks/Stories.tsx index 9d460a5cd830..d393b822fdd6 100644 --- a/addons/docs/src/blocks/Stories.tsx +++ b/addons/docs/src/blocks/Stories.tsx @@ -13,6 +13,7 @@ export const Stories: FunctionComponent = ({ title, includePrimary const { componentStories } = useContext(DocsContext); let stories: DocsStoryProps[] = componentStories(); + stories = stories.filter((story) => !story.parameters?.docs?.disable); if (!includePrimary) stories = stories.slice(1); if (!stories || stories.length === 0) {