From bb70d37a192605979a4e11de78018bd9a11c99e9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 21 Nov 2023 23:09:25 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/button/Button.stories.tsx | 4 ++-- src/button/Button.tsx | 42 ++++++++++++++++++++--------------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/src/button/Button.stories.tsx b/src/button/Button.stories.tsx index 3865287..4ef8f83 100644 --- a/src/button/Button.stories.tsx +++ b/src/button/Button.stories.tsx @@ -22,8 +22,8 @@ ButtonStory.argTypes = { labels: { primary: "Primary", secondary: "Secondary", - } + }, }, defaultValue: "primary", - } + }, }; diff --git a/src/button/Button.tsx b/src/button/Button.tsx index 35fa76e..404423c 100644 --- a/src/button/Button.tsx +++ b/src/button/Button.tsx @@ -1,33 +1,39 @@ import { cn } from "@/utils/merge.js"; -import {cva, VariantProps} from "class-variance-authority"; +import { cva, VariantProps } from "class-variance-authority"; -export interface ButtonProps extends React.HTMLAttributes, VariantProps { +export interface ButtonProps + extends React.HTMLAttributes, + VariantProps { disabled?: boolean; } -const buttonStyle = cva("bg-primary text-white py-3 px-6 rounded leading-[1.15]", { - variants: { - intent: { - primary: "bg-primary text-white", - secondary: "bg-secondary text-white", +const buttonStyle = cva( + "bg-primary text-white py-3 px-6 rounded leading-[1.15]", + { + variants: { + intent: { + primary: "bg-primary text-white", + secondary: "bg-secondary text-white", + }, + disabled: { + true: "opacity-50 cursor-not-allowed", + false: "", + }, }, - disabled: { - true: "opacity-50 cursor-not-allowed", - false: "", - } - } -}) + }, +); export const Button = (props: ButtonProps) => { const { className, intent, ...rest } = props; return (