Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/button-icon-current-color.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"datocms-react-ui": patch
---

`Button` icons now take the button's own text color instead of always using the link color. This fixes accent-colored icons on red `negative` buttons, on `primary` buttons, and on disabled buttons.
6 changes: 4 additions & 2 deletions packages/react-ui/src/Button/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@
line-height: 0.6;

svg {
fill: var(--color--ink-link);
color: var(--color--ink-link);
fill: currentColor;
/* Not redundant: icons painting via `currentColor` (e.g. FontAwesome) would
otherwise pick up a plugin's own `color` rule on the svg */
color: currentColor;
}
}

Expand Down
Loading