@artsy/palette-mobile 17.2.0 → 17.2.1
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.
|
@@ -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