From 8e3aa7ef3380836fd36a12698b1f6982e110c0f7 Mon Sep 17 00:00:00 2001 From: Samuel Gunter Date: Mon, 12 Feb 2024 01:51:46 -0600 Subject: [PATCH] fix: only show button hover effects when not disabled --- src/views/components/common/Button/Button.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/views/components/common/Button/Button.tsx b/src/views/components/common/Button/Button.tsx index 498fef16..d2be0bd3 100644 --- a/src/views/components/common/Button/Button.tsx +++ b/src/views/components/common/Button/Button.tsx @@ -50,10 +50,11 @@ export function Button({ 'btn', { 'disabled:(cursor-not-allowed opacity-50)': disabled, - 'color-white bg-[var(--color)] border-[var(--color)] hover:btn-shadow': variant === 'filled', - 'color-[var(--color)] bg-white border-current hover:btn-shade border border-solid': + 'color-white bg-[var(--color)] border-[var(--color)] hover:enabled:btn-shadow': + variant === 'filled', + 'color-[var(--color)] bg-white border-current hover:enabled:btn-shade border border-solid': variant === 'outline', - 'color-[var(--color)] bg-white border-white hover:btn-shade': variant === 'single', // settings is the only "single" + 'color-[var(--color)] bg-white border-white hover:enabled:btn-shade': variant === 'single', // settings is the only "single" 'px-2 py-1.25': isIconOnly && variant !== 'outline', 'px-1.75 py-1.25': isIconOnly && variant === 'outline', 'px-3.75': variant === 'outline' && !isIconOnly,