Skip to content

Commit

Permalink
chore: added storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
niloofar-deriv committed May 7, 2024
1 parent 0a1753b commit 1a6f4e9
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
31 changes: 31 additions & 0 deletions stories/Footer.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { Meta, StoryObj } from "@storybook/react";
import { Footer } from "../src/main";

const meta = {
title: "Components/Footer",
component: Footer,
args: {
className: "test-class",
},
argTypes: {
className: {
control: false,
description: "Additional classes to be applied to the header.",
},
},
parameters: { layout: "centered" },
tags: ["autodocs"],
} satisfies Meta<typeof Footer>;

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

export const Default: Story = {
name: "Footer",
render: () => (
<div style={{ width: "900px" }}>
<span>content</span>
<Footer>Test footer</Footer>
</div>
),
};
30 changes: 30 additions & 0 deletions stories/Header.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import type { Meta, StoryObj } from "@storybook/react";
import { Header } from "../src/main";

const meta = {
title: "Components/Header",
component: Header,
args: {
className: "test-class",
},
argTypes: {
className: {
control: false,
description: "Additional classes to be applied to the header.",
},
},
parameters: { layout: "centered" },
tags: ["autodocs"],
} satisfies Meta<typeof Header>;

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

export const Default: Story = {
name: "Header",
render: () => (
<div style={{ width: "900px" }}>
<Header>Test Header</Header>
</div>
),
};
41 changes: 41 additions & 0 deletions stories/Wrapper.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import type { Meta, StoryObj } from "@storybook/react";
import { Wrapper } from "../src/main";

const meta = {
title: "Components/Wrapper",
component: Wrapper,
args: {
className: "test-class",
variant: "left",
},
argTypes: {
className: {
control: false,
description: "Additional classes to be applied to the header.",
},
variant: {
options: ["left", "right"],
control: { type: "radio" },
},
},
parameters: { layout: "centered" },
tags: ["autodocs"],
} satisfies Meta<typeof Wrapper>;

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

export const Default: Story = {
name: "Wrapper",
render: () => (
<div style={{ display: "flex", width: "900px" }}>
<Wrapper variant="left" style={{ backgroundColor: "orange" }}>
Left Wrapper
</Wrapper>

<Wrapper variant="right" style={{ backgroundColor: "pink" }}>
Right Wrapper
</Wrapper>
</div>
),
};

0 comments on commit 1a6f4e9

Please sign in to comment.