Skip to content

Commit

Permalink
Correct disabled Button icon fill colors (#3368)
Browse files Browse the repository at this point in the history
* corrects disabled button icon colors

* Create dry-olives-rule.md
  • Loading branch information
mperrotti committed Jun 7, 2023
1 parent 7d8247e commit c8095a1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/dry-olives-rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Correct disabled Button icon fill colors
2 changes: 1 addition & 1 deletion src/Button/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const getVariantStyles = (variant: VariantType = 'default', theme?: Theme
},
'&:disabled': {
color: 'primer.fg.disabled',
'[data-component=ButtonCounter]': {
'[data-component=ButtonCounter], [data-component="leadingVisual"], [data-component="trailingAction"]': {
color: 'inherit',
},
},
Expand Down
4 changes: 3 additions & 1 deletion src/__tests__/__snapshots__/Button.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,9 @@ exports[`Button styles invisible button appropriately 1`] = `
color: primer.fg.disabled;
}
.c0:disabled [data-component=ButtonCounter] {
.c0:disabled [data-component=ButtonCounter],
.c0:disabled [data-component="leadingVisual"],
.c0:disabled [data-component="trailingAction"] {
color: inherit;
}
Expand Down
12 changes: 9 additions & 3 deletions src/__tests__/__snapshots__/TextInput.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1336,7 +1336,9 @@ exports[`TextInput renders trailingAction icon button 1`] = `
color: #8c959f;
}
.c4:disabled [data-component=ButtonCounter] {
.c4:disabled [data-component=ButtonCounter],
.c4:disabled [data-component="leadingVisual"],
.c4:disabled [data-component="trailingAction"] {
color: inherit;
}
Expand Down Expand Up @@ -1982,7 +1984,9 @@ exports[`TextInput renders trailingAction text button 1`] = `
color: #8c959f;
}
.c3:disabled [data-component=ButtonCounter] {
.c3:disabled [data-component=ButtonCounter],
.c3:disabled [data-component="leadingVisual"],
.c3:disabled [data-component="trailingAction"] {
color: inherit;
}
Expand Down Expand Up @@ -2383,7 +2387,9 @@ exports[`TextInput renders trailingAction text button with a tooltip 1`] = `
color: #8c959f;
}
.c4:disabled [data-component=ButtonCounter] {
.c4:disabled [data-component=ButtonCounter],
.c4:disabled [data-component="leadingVisual"],
.c4:disabled [data-component="trailingAction"] {
color: inherit;
}
Expand Down

0 comments on commit c8095a1

Please sign in to comment.