From fd7317e59717ae9da51ec374449c0c466d3abc23 Mon Sep 17 00:00:00 2001 From: p-sw Date: Fri, 28 Jun 2024 12:08:01 +0900 Subject: [PATCH] feat: add disabled color --- packages/react/components/Button.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react/components/Button.tsx b/packages/react/components/Button.tsx index 951c336..b197662 100644 --- a/packages/react/components/Button.tsx +++ b/packages/react/components/Button.tsx @@ -2,6 +2,7 @@ import React from "react"; import { vcn, VariantProps, Slot, AsChild } from "@pswui-lib"; const colors = { + disabled: "disabled:brightness-50 disabled:cursor-not-allowed disabled:opacity-50 disabled:saturate-50", outline: { focus: "dark:focus-visible:outline-white/20 focus-visible:outline-black/10", }, @@ -26,7 +27,7 @@ const colors = { }; const [buttonVariants, resolveVariants] = vcn({ - base: `w-fit flex flex-row items-center justify-between rounded-md outline outline-1 outline-transparent outline-offset-2 ${colors.outline.focus} transition-all cursor-pointer`, + base: `w-fit flex flex-row items-center justify-between rounded-md outline outline-1 outline-transparent outline-offset-2 ${colors.outline.focus} ${colors.disabled} transition-all cursor-pointer`, variants: { size: { link: "p-0 text-base",