From 2ee9955971f9343b738b077d5514ac9c0d10dc3e Mon Sep 17 00:00:00 2001 From: Jeremy Neal Date: Mon, 17 Apr 2023 15:57:34 -0400 Subject: [PATCH 1/9] Set disabled invisible button color similarly to other button variants. --- src/Button/styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Button/styles.ts b/src/Button/styles.ts index 620850c44196..3c5a16c15daf 100644 --- a/src/Button/styles.ts +++ b/src/Button/styles.ts @@ -113,7 +113,7 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme backgroundColor: 'btn.selectedBg', }, '&:disabled': { - color: 'primer.fg.disabled', + color: 'btn.invisible.disabledText', '[data-component=ButtonCounter]': { color: 'inherit', }, From 2e9507b2638e07b3411f37109ce9e91a1b78f218 Mon Sep 17 00:00:00 2001 From: Jeremy Neal Date: Mon, 17 Apr 2023 16:20:12 -0400 Subject: [PATCH 2/9] Don't set [data-no-visual=true] on invisible button variants. --- src/Button/ButtonBase.tsx | 4 +++- src/Button/styles.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Button/ButtonBase.tsx b/src/Button/ButtonBase.tsx index 18e38f40df81..96c0994db54d 100644 --- a/src/Button/ButtonBase.tsx +++ b/src/Button/ButtonBase.tsx @@ -65,7 +65,9 @@ const ButtonBase = forwardRef( ref={innerRef} data-block={block ? 'block' : null} data-size={size === 'small' || size === 'large' ? size : undefined} - data-no-visuals={!LeadingIcon && !TrailingIcon && !TrailingAction ? true : undefined} + data-no-visuals={ + !LeadingIcon && !TrailingIcon && !TrailingAction && variant !== 'invisible' ? true : undefined + } > {Icon ? ( diff --git a/src/Button/styles.ts b/src/Button/styles.ts index 3c5a16c15daf..620850c44196 100644 --- a/src/Button/styles.ts +++ b/src/Button/styles.ts @@ -113,7 +113,7 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme backgroundColor: 'btn.selectedBg', }, '&:disabled': { - color: 'btn.invisible.disabledText', + color: 'primer.fg.disabled', '[data-component=ButtonCounter]': { color: 'inherit', }, From 88b2ffe45c3fa20f0e72bc7acd5317c42084ca93 Mon Sep 17 00:00:00 2001 From: Jeremy Neal Date: Mon, 17 Apr 2023 16:30:10 -0400 Subject: [PATCH 3/9] Update snapshots. --- src/__tests__/__snapshots__/Button.test.tsx.snap | 1 - src/__tests__/__snapshots__/TextInput.test.tsx.snap | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/__tests__/__snapshots__/Button.test.tsx.snap b/src/__tests__/__snapshots__/Button.test.tsx.snap index 0650867f2a94..a1657302cf55 100644 --- a/src/__tests__/__snapshots__/Button.test.tsx.snap +++ b/src/__tests__/__snapshots__/Button.test.tsx.snap @@ -1635,7 +1635,6 @@ exports[`Button styles invisible button appropriately 1`] = `