From ec74216681662ad6103d6c8b09e70a0898a6376f Mon Sep 17 00:00:00 2001 From: yamato0211 Date: Mon, 13 Nov 2023 00:43:12 +0900 Subject: [PATCH] fix: remove cva --- src/components/ui/IconButton/index.tsx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/components/ui/IconButton/index.tsx b/src/components/ui/IconButton/index.tsx index 04763e9..d889850 100644 --- a/src/components/ui/IconButton/index.tsx +++ b/src/components/ui/IconButton/index.tsx @@ -2,19 +2,15 @@ import type { ButtonHTMLAttributes, ReactNode } from "react"; import { forwardRef } from "react" import { Slot } from "@radix-ui/react-slot" -import { cva } from "class-variance-authority" -import type { VariantProps } from "class-variance-authority" +import { buttonVariants } from "../Button"; import { cn } from "@/libs/utils" -const buttonVariants = cva( - "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50", -) -export interface ButtonProps - extends ButtonHTMLAttributes, - VariantProps { +const buttonStyles = "inline-flex items-center justify-center whitespace-nowrap rounded-full text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50" + +export interface ButtonProps extends ButtonHTMLAttributes { asChild?: boolean } @@ -35,7 +31,7 @@ const IconButton = forwardRef( const Comp = asChild ? Slot : "button" return (