Skip to content

Commit

Permalink
fix: Allow inherit background color on system icon (#2932)
Browse files Browse the repository at this point in the history
Fixes: #2930

[category:Components]

Co-authored-by: manuel.carrera <manuel.carrera@workday.com>
  • Loading branch information
mannycarrera4 and manuel.carrera committed Sep 19, 2024
1 parent dd8d294 commit ededc69
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions modules/react/icon/lib/SystemIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,18 +151,18 @@ export const systemIconStencil = createStencil({
*/
color: '',
accentColor: '',
backgroundColor: 'transparent',
backgroundColor: '',
},
base: ({accentColor, backgroundColor, color}) => ({
[backgroundColor]: 'transparent',
[backgroundColor]: cssVar(backgroundColor, 'transparent'),
'& .wd-icon-fill': {
fill: cssVar(color, base.licorice200),
},
'& .wd-icon-accent, & .wd-icon-accent2': {
fill: cssVar(accentColor, cssVar(color, base.licorice200)),
},
'& .wd-icon-background': {
fill: backgroundColor,
fill: cssVar(backgroundColor, 'transparent'),
},
// will be removed eventually
'&:where(:hover, .hover) .wd-icon-fill': {
Expand All @@ -181,7 +181,10 @@ export const systemIconStencil = createStencil({
),
},
'&:where(:hover, .hover) .wd-icon-background': {
fill: cssVar(deprecatedSystemIconVars.backgroundHover, backgroundColor),
fill: cssVar(
deprecatedSystemIconVars.backgroundHover,
cssVar(backgroundColor, 'transparent')
),
},
}),
});
Expand Down

0 comments on commit ededc69

Please sign in to comment.