-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π
style: add dummy stories for chromatic build
- Loading branch information
1 parent
a676927
commit ce50437
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |