From 2cc13c322f501127f935339e0eaec4c641f95055 Mon Sep 17 00:00:00 2001 From: saltedTofu Date: Fri, 29 Apr 2022 09:14:07 -0500 Subject: [PATCH] fix(ui-components): disabled button behavior (#45739) * fixed disabled button behavior Changed disabled button to not have active styles * Update tools/ui-components/src/button/button.tsx Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> * Update tools/ui-components/src/button/button.tsx * Update tools/ui-components/src/button/button.tsx Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> --- tools/ui-components/src/button/button.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/ui-components/src/button/button.tsx b/tools/ui-components/src/button/button.tsx index d618f5b5df7..6dce5befe6e 100644 --- a/tools/ui-components/src/button/button.tsx +++ b/tools/ui-components/src/button/button.tsx @@ -46,7 +46,7 @@ const computeClassNames = ({ 'bg-default-background-danger', 'text-default-foreground-danger', ...(disabled - ? [] + ? ['active:before:hidden'] : [ 'hover:bg-default-background-danger-hover', 'hover:text-default-foreground-danger-hover' @@ -59,7 +59,7 @@ const computeClassNames = ({ 'bg-default-background-info', 'text-default-foreground-info', ...(disabled - ? [] + ? ['active:before:hidden'] : [ 'hover:bg-default-background-info-hover', 'hover:text-default-foreground-info-hover' @@ -73,7 +73,7 @@ const computeClassNames = ({ 'bg-default-background-quaternary', 'text-default-foreground-secondary', ...(disabled - ? [] + ? ['active:before:hidden'] : [ 'hover:bg-default-background-primary-hover', 'hover:text-default-foreground-primary-hover'