From c81a2b943afcaca47f3cf68e6186faca3f37c1dc Mon Sep 17 00:00:00 2001 From: Sven van de Scheur Date: Mon, 15 Jan 2024 16:56:12 +0100 Subject: [PATCH] :bug: #4 - docs: fix issue where page component would be decorated with page component --- .storybook/preview.tsx | 12 ++++++++---- src/components/page/page.stories.tsx | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx index f55d4544..ac78ae5f 100644 --- a/.storybook/preview.tsx +++ b/.storybook/preview.tsx @@ -5,11 +5,15 @@ import { Page } from "../src"; const preview: Preview = { decorators: [ - (Story) => ( - + (Story, { parameters }) => { + return parameters.ignoreGlobalDecorator ? ( - - ), + ) : ( + + + + ); + }, ], parameters: { actions: { argTypesRegex: "^on[A-Z].*" }, diff --git a/src/components/page/page.stories.tsx b/src/components/page/page.stories.tsx index e4d915a6..b5244417 100644 --- a/src/components/page/page.stories.tsx +++ b/src/components/page/page.stories.tsx @@ -17,6 +17,7 @@ const meta = { title: "Building Blocks/Page", component: Page, parameters: { + ignoreGlobalDecorator: true, layout: "fullscreen", }, } satisfies Meta;