Skip to content

Commit

Permalink
🐛 #4 - docs: fix issue where page component would be decorated with p…
Browse files Browse the repository at this point in the history
…age component
  • Loading branch information
svenvandescheur committed Jan 15, 2024
1 parent ccd62e7 commit c81a2b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ import { Page } from "../src";

const preview: Preview = {
decorators: [
(Story) => (
<Page>
(Story, { parameters }) => {
return parameters.ignoreGlobalDecorator ? (
<Story />
</Page>
),
) : (
<Page>
<Story />
</Page>
);
},
],
parameters: {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand Down
1 change: 1 addition & 0 deletions src/components/page/page.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const meta = {
title: "Building Blocks/Page",
component: Page,
parameters: {
ignoreGlobalDecorator: true,
layout: "fullscreen",
},
} satisfies Meta<PagePropsAndCustomArgs>;
Expand Down

0 comments on commit c81a2b9

Please sign in to comment.