Skip to content

Commit

Permalink
Bug fix: invisible Button variant missing background color when dis…
Browse files Browse the repository at this point in the history
…abled (#4928)

* fix

* Create serious-terms-sniff.md

* snaps

* delete snaps to regen

* use transparent as fallback its fine

* snaps

* test(vrt): update snapshots

---------

Co-authored-by: langermank <[email protected]>
  • Loading branch information
langermank and langermank authored Sep 6, 2024
1 parent a33d6c2 commit caf4bcf
Show file tree
Hide file tree
Showing 13 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/serious-terms-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Bug fix: `invisible` Button variant missing background color when disabled
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -1680,6 +1680,7 @@ exports[`Button styles invisible button appropriately 1`] = `
cursor: not-allowed;
box-shadow: none;
color: primer.fg.disabled;
background-color: var(--button-invisible-bgColor-disabled,transparent);
}
.c0:disabled [data-component=ButtonCounter],
Expand Down
1 change: 1 addition & 0 deletions packages/react/src/Button/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme
},
'&:disabled': {
color: 'primer.fg.disabled',
backgroundColor: `var(--button-invisible-bgColor-disabled, transparent)`,
'[data-component=ButtonCounter], [data-component="leadingVisual"], [data-component="trailingAction"]': {
color: 'inherit',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1761,6 +1761,7 @@ exports[`TextInput renders trailingAction icon button 1`] = `
cursor: not-allowed;
box-shadow: none;
color: var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));
background-color: var(--button-invisible-bgColor-disabled,transparent);
}
.c4:disabled [data-component=ButtonCounter],
Expand Down Expand Up @@ -2391,6 +2392,7 @@ exports[`TextInput renders trailingAction text button 1`] = `
cursor: not-allowed;
box-shadow: none;
color: var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));
background-color: var(--button-invisible-bgColor-disabled,transparent);
}
.c4:disabled [data-component=ButtonCounter],
Expand Down Expand Up @@ -2882,6 +2884,7 @@ exports[`TextInput renders trailingAction text button with a tooltip 1`] = `
cursor: not-allowed;
box-shadow: none;
color: var(--fgColor-disabled,var(--color-primer-fg-disabled,#8c959f));
background-color: var(--button-invisible-bgColor-disabled,transparent);
}
.c4:disabled [data-component=ButtonCounter],
Expand Down

0 comments on commit caf4bcf

Please sign in to comment.