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>
This commit is contained in:
saltedTofu 2022-04-29 09:14:07 -05:00 committed by GitHub
parent 3999de294f
commit 2cc13c322f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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'