Skip to content

Commit

Permalink
πŸ’… style: add dummy stories for chromatic build
Browse files Browse the repository at this point in the history
  • Loading branch information
froggy1014 committed Aug 1, 2024
1 parent a676927 commit ce50437
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import type { Preview } from "@storybook/react";
import React from "react";

import { Pretendard } from "../src/app/fonts/index";
import "../src/styles/globals.css";
import "../src/styles/theme.css";
import { cn } from "../src/utils/cn";

const preview: Preview = {
parameters: {
Expand Down
28 changes: 28 additions & 0 deletions src/components/button/SquareTabButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type { Meta, StoryObj } from "@storybook/react";

import SquareTabButton from "./SquareTabButton";

const meta: Meta<typeof SquareTabButton> = {
title: "SquareTabButton",
component: SquareTabButton,
parameters: {
layout: "centered",
},

argTypes: {
active: {
control: {
type: "boolean",
},
},
},
};

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

export const Typographys: Story = {
args: {
active: false,
},
};
25 changes: 25 additions & 0 deletions src/components/button/SquareTabButton.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { Button, ButtonProps } from "@radix-ui/themes";
import { FC } from "react";

import { cn } from "@/utils/cn";

export interface Props extends ButtonProps {
active: boolean;
}

const SquareTabButton: FC<Props> = ({ active = false, ...props }) => {
return (
<Button
className={cn(
"w-[108px] h-[108px] duration-300",
active ? "bg-primary-01" : "bg-primary-04",
props.className,
)}
{...props}
>
{props.children}
</Button>
);
};

export default SquareTabButton;

0 comments on commit ce50437

Please sign in to comment.