From 709f2885ba0507566a7f313bedc06039a846e154 Mon Sep 17 00:00:00 2001 From: adids1221 Date: Tue, 1 Apr 2025 16:22:48 +0300 Subject: [PATCH 1/3] Refactor Button component to determine filled state based on background color --- src/components/button/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/button/index.tsx b/src/components/button/index.tsx index 4c60f0b703..1f33f95dee 100644 --- a/src/components/button/index.tsx +++ b/src/components/button/index.tsx @@ -72,7 +72,7 @@ class Button extends PureComponent { } get isFilled() { - return !this.isOutline && !this.isLink; + return this.getBackgroundColor() !== 'transparent'; } get isIconButton() { From dc1d89314b580101e5cf385bbe204dd99fdc10ef Mon Sep 17 00:00:00 2001 From: adids1221 Date: Wed, 2 Apr 2025 09:53:06 +0300 Subject: [PATCH 2/3] Remove unused isOutline method --- src/components/button/index.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/components/button/index.tsx b/src/components/button/index.tsx index 1f33f95dee..51189a7276 100644 --- a/src/components/button/index.tsx +++ b/src/components/button/index.tsx @@ -61,11 +61,6 @@ class Button extends PureComponent { } }; - get isOutline() { - const {outline, outlineColor} = this.props; - return Boolean(outline || outlineColor); - } - get isLink() { const {link, hyperlink} = this.props; return link || hyperlink; From f7bdabf64b92b8099b5a954ae06a49bccc799d0d Mon Sep 17 00:00:00 2001 From: adids1221 Date: Wed, 2 Apr 2025 14:53:46 +0300 Subject: [PATCH 3/3] Fix Button component disabled state check for outline and link types --- src/components/button/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/button/index.tsx b/src/components/button/index.tsx index 51189a7276..b3f40b8182 100644 --- a/src/components/button/index.tsx +++ b/src/components/button/index.tsx @@ -111,7 +111,7 @@ class Button extends PureComponent { color = backgroundColor === 'transparent' ? undefined : Colors.$iconDefaultLight; } - if (disabled && (isLink || outline)) { + if (disabled && !this.isFilled) { return Colors.$textDisabled; }