Skip to content

Commit

Permalink
Icon button plain destructive active and hover styles (#9785)
Browse files Browse the repository at this point in the history
### WHY are these changes introduced?

Fixes Shopify/archive-polaris-backlog-2024#994

### WHAT is this pull request doing?

Updates the hover and active color for the `plain` `destructive` icon
only buttons

<img width="128" alt="Screenshot 2023-07-20 at 2 31 21 PM"
src="https://github.com/Shopify/polaris/assets/3474483/7c6f380b-b795-4f01-b161-4443522da92d">


### How to 🎩
Review in Storybook with the beta flag turned on
  • Loading branch information
aveline authored Jul 20, 2023
1 parent 571acc1 commit 6e202c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions polaris-react/src/components/Button/Button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@
fill: var(--p-color-bg-critical-strong-hover);

#{$se23} & {
fill: var(--p-color-icon-critical-strong-experimental);
fill: var(--p-color-icon-critical-hover-experimental);
}
}

Expand All @@ -1093,7 +1093,7 @@
fill: var(--p-color-bg-critical-strong-active);

#{$se23} & {
fill: var(--p-color-icon-critical-strong-experimental);
fill: var(--p-color-icon-critical-active-experimental);
}
}

Expand Down
16 changes: 13 additions & 3 deletions polaris-tokens/src/token-groups/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,14 @@ type ColorTextAliasExperimental = Experimental<
>;

type ColorIconAliasExperimental = Experimental<
| 'icon-critical-active'
| 'icon-critical-hover'
| 'icon-critical-strong-active'
| 'icon-critical-strong-hover'
| 'icon-critical-strong'
| 'icon-info-strong'
| 'icon-success-strong'
| 'icon-warning-strong'
| 'icon-critical-strong'
| 'icon-critical-strong-hover'
| 'icon-critical-strong-active'
>;

type ColorBorderAliasExperimental = Experimental<
Expand Down Expand Up @@ -1021,6 +1023,14 @@ export const color: {
value: colorsExperimental.red[16],
description: '',
},
'color-icon-critical-hover-experimental': {
value: colorsExperimental.red[15],
description: '',
},
'color-icon-critical-active-experimental': {
value: colorsExperimental.red[16],
description: '',
},
'color-avatar-background-experimental': {
value: colorsExperimental.gray[11](),
description: '',
Expand Down

0 comments on commit 6e202c1

Please sign in to comment.