Skip to content

Commit 885a053

Browse files
author
Dominic McPhee
committed
Adding to unreleased
1 parent 538eae1 commit 885a053

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

UNRELEASED.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ Use [the changelog guidelines](https://git.io/polaris-changelog-guidelines) to f
1010

1111
Updated `Textfield` with a `type` of `number` to not render a spinner if step is set to `0` ([#3477](https://github.com/Shopify/polaris-react/pull/3477))
1212

13+
- Optimized `ThemeProvider` to only output its custom properties in nested `ThemeProvider`s when they differ from the parent context ([#3550](https://github.com/Shopify/polaris-react/pull/3550))
14+
1315
### Bug fixes
1416

1517
Fixed `Filters` overflow ([#3532](https://github.com/Shopify/polaris-react/pull/3532))

src/components/ThemeProvider/ThemeProvider.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,7 @@ export function ThemeProvider({
101101
!isParentThemeProvider &&
102102
parentContext!.cssCustomProperties !== toString(customProperties)
103103
) {
104-
customProperties.color = color;
105-
style = customProperties;
104+
style = {...customProperties, ...{color}};
106105
} else {
107106
style = {color};
108107
}

0 commit comments

Comments
 (0)