@artsy/palette-mobile 17.2.0 → 17.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -138,7 +138,8 @@ const PILL_VARIANTS = {
|
|
|
138
138
|
};
|
|
139
139
|
const defaultColors = {
|
|
140
140
|
default: "mono100",
|
|
141
|
-
|
|
141
|
+
// @ts-expect-error We want to set the color to white here regardless of the theme
|
|
142
|
+
selected: "white",
|
|
142
143
|
disabled: "mono60",
|
|
143
144
|
};
|
|
144
145
|
const TEXT_COLOR = {
|
|
@@ -27,5 +27,10 @@ const color = (theme) => (colorName) => {
|
|
|
27
27
|
if (colorName === undefined) {
|
|
28
28
|
return undefined;
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
const themeColor = theme.colors[colorName];
|
|
31
|
+
// return the color that was passed if it's not supported by the theme (e.g., for a theme-independent `white`).
|
|
32
|
+
if (!themeColor) {
|
|
33
|
+
return colorName;
|
|
34
|
+
}
|
|
35
|
+
return themeColor;
|
|
31
36
|
};
|
package/package.json
CHANGED