From de8c9dace73cb3ddcebd7167b9c2872c70ff2200 Mon Sep 17 00:00:00 2001 From: Nathan Vasse Date: Mon, 25 Mar 2024 16:29:03 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(react)=20remove=20Misc=20stories?= =?UTF-8?q?=20from=20Storybook=20sidebar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These files include stories only used from regular documentation, they have no other purpose so we decided to hide them. --- packages/react/.storybook/manager.tsx | 10 ++++++++++ packages/react/.storybook/preview.tsx | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/react/.storybook/manager.tsx b/packages/react/.storybook/manager.tsx index 9ec4ca9..0a4802b 100644 --- a/packages/react/.storybook/manager.tsx +++ b/packages/react/.storybook/manager.tsx @@ -32,3 +32,13 @@ addons.register('theme-synchronizer', () => { }, }); }); + +addons.setConfig({ + sidebar: { + filters: { + hidden: item => { + return !item.title.startsWith('Misc/'); + } + } + } +}); diff --git a/packages/react/.storybook/preview.tsx b/packages/react/.storybook/preview.tsx index 42d2dcb..bad4109 100644 --- a/packages/react/.storybook/preview.tsx +++ b/packages/react/.storybook/preview.tsx @@ -42,7 +42,7 @@ const preview: Preview = { }, options: { storySort: (a, b) => { - const roots = ['Getting Started', 'Components', 'Migrating', 'Misc']; + const roots = ['Getting Started', 'Components', 'Migrating']; const gettingStartedOrder = [ 'Installation', 'First steps',