Skip to content

Commit

Permalink
🧐 #4 - feat: debug control to page story
Browse files Browse the repository at this point in the history
  • Loading branch information
svenvandescheur committed Jan 11, 2024
1 parent 128d892 commit 553f8c1
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/components/page/page.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,20 @@ import { Column } from "../layout/column";
import { Logo } from "../logo";
import { Page } from "./page";

type PagePropsAndCustomArgs = React.ComponentProps<typeof Page> & {
debug?: boolean;
};

const meta = {
title: "Building Blocks/Page",
component: Page,
parameters: {
layout: "fullscreen",
},
} satisfies Meta<typeof Page>;
} satisfies Meta<PagePropsAndCustomArgs>;

export default meta;
type Story = StoryObj<typeof meta>;
type Story = StoryObj<PagePropsAndCustomArgs>;

export const PageComponent: Story = {
args: {
Expand All @@ -25,10 +29,13 @@ export const PageComponent: Story = {

export const SamplePage: Story = {
args: {
children: (
<Container>
<Grid>
<Column span={12}>
debug: false,
},
render: ({ debug }) => (
<Page>
<Container debug={debug}>
<Grid debug={debug}>
<Column debug={debug} span={12}>
<Logo
href="/?path=/story/building-blocks-page--sample-page"
hrefLabel="Navigate to story page"
Expand All @@ -37,6 +44,6 @@ export const SamplePage: Story = {
</Column>
</Grid>
</Container>
),
},
</Page>
),
};

0 comments on commit 553f8c1

Please sign in to comment.