Skip to content

Commit

Permalink
fix: resolve comments for storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
aizad-deriv committed Feb 28, 2024
1 parent 2e4781f commit c6f5ca0
Showing 1 changed file with 13 additions and 28 deletions.
41 changes: 13 additions & 28 deletions src/stories/Button.stories.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
import type { Meta, StoryObj } from "@storybook/react";

import { Button } from "../../lib/components/Button";

// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
const meta = {
title: "Components/Button",
component: Button,
parameters: {
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
layout: "centered",
},
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
tags: ["autodocs"],
args: {
variant: "contained",
Expand All @@ -24,7 +20,7 @@ const meta = {
type: "button",
textSize: "sm",
},
// More on argTypes: https://storybook.js.org/docs/api/argtypes

argTypes: {
variant: {
options: ["contained", "outlined", "ghost"],
Expand Down Expand Up @@ -63,7 +59,6 @@ const meta = {
export default meta;
type Story = StoryObj<typeof meta>;

// More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
export const Contained: Story = {
args: {
variant: "contained",
Expand All @@ -87,109 +82,99 @@ export const Outlined: Story = {

export const ContainedPrimary: Story = {
name: "Contained (Primary)",
args: {
variant: "contained",
children: "Button",
color: "primary",
},
args: { ...meta.args },
};

export const ContainedPrimaryLight: Story = {
name: "Contained (Primary Light)",
args: {
variant: "contained",
children: "Button",
...meta.args,
color: "primary-light",
size: "md",
},
};

export const ContainedBlack: Story = {
name: "Contained (Black)",
args: {
variant: "contained",
children: "Button",
...meta.args,
color: "black",
},
};

export const ContainedWhite: Story = {
name: "Contained (White)",
args: {
variant: "contained",
children: "Button",
...meta.args,
color: "white",
},
};

export const OutlinedPrimary: Story = {
name: "Outlined (Primary)",
args: {
...meta.args,
variant: "outlined",
children: "Button",
color: "primary",
},
};

export const OutlinedPrimaryLight: Story = {
name: "Outlined (Primary Light)",
args: {
...meta.args,
variant: "outlined",
children: "Button",
color: "primary-light",
},
};

export const OutlinedBlack: Story = {
name: "Outlined (Black)",
args: {
...meta.args,
variant: "outlined",
children: "Button",
color: "black",
},
};

export const OutlinedWhite: Story = {
name: "Outlined (White)",
args: {
...meta.args,
variant: "outlined",
children: "Button",
color: "white",
},
};

export const GhostPrimary: Story = {
name: "Ghost (Primary)",
args: {
...meta.args,
variant: "ghost",
children: "Button",
color: "primary",
},
};

export const GhostPrimaryLight: Story = {
name: "Ghost (Primary Light)",
args: {
...meta.args,
variant: "ghost",
children: "Button",
color: "primary-light",
},
};

export const GhostBlack: Story = {
name: "Ghost (Black)",
args: {
...meta.args,
variant: "ghost",
children: "Button",
color: "black",
},
};

export const GhostWhite: Story = {
name: "Ghost (White)",
args: {
...meta.args,
variant: "ghost",
children: "Button",
color: "white",
},
};

0 comments on commit c6f5ca0

Please sign in to comment.