Skip to content

Commit 2de2da3

Browse files
anveshmekalabenelan
authored andcommitted
fix(button): add backward compatibility for --calcite-ui-icon-color token (#13058)
**Related Issue:** #13038 ## Summary Add back support for `--calcite-ui-icon-color`. ##### Side note: Issue is resolved by this [update](https://devtopia.esri.com/WebGIS/arcgis-js-api/pull/74895#issuecomment-5829349) to use `--calcite-icon-color` instead of `--calcite-ui-icon-color`. This fix will help resolve similar use cases.
1 parent 2543e24 commit 2de2da3

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

packages/calcite-components/src/components/button/button.e2e.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -709,5 +709,19 @@ describe("calcite-button", () => {
709709
],
710710
});
711711
});
712+
describe("deprecated", () => {
713+
themed(html`<calcite-button icon-start="layer" icon-end="layer"></calcite-button>`, {
714+
"--calcite-ui-icon-color": [
715+
{
716+
shadowSelector: `.${CSS.iconStart}`,
717+
targetProp: "color",
718+
},
719+
{
720+
shadowSelector: `.${CSS.iconEnd}`,
721+
targetProp: "color",
722+
},
723+
],
724+
});
725+
});
712726
});
713727
});

packages/calcite-components/src/components/button/button.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226

227227
.icon--start,
228228
.icon--end {
229-
color: var(--calcite-button-icon-color, var(--calcite-icon-color));
229+
color: var(--calcite-button-icon-color, var(--calcite-icon-color, var(--calcite-ui-icon-color)));
230230
}
231231
@include disabled();
232232

0 commit comments

Comments
 (0)