react-themed-too
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -30,7 +30,16 @@ "use strict"; | ||
const pluck = (theme, keys) => keys.reduce((acc, key) => { | ||
acc[key] = theme[key]; | ||
return acc; | ||
}, {}); | ||
const pluck = (theme, keys) => { | ||
if (theme && keys !== void 0) { | ||
return keys.reduce((acc, key) => { | ||
if (keys !== void 0 && theme[key]) { | ||
acc[key] = theme[key]; | ||
} | ||
return acc; | ||
}, {}); | ||
} | ||
return {}; | ||
}; | ||
const match = (theme, regex) => Object.keys(theme).reduce((acc, key) => { | ||
@@ -51,2 +60,7 @@ if (key.match(regex)) acc[key] = theme[key]; | ||
let thisTheme = undefined; | ||
if (!shared) { | ||
return {}; | ||
} | ||
themes.forEach(theme => { | ||
@@ -69,3 +83,5 @@ if (Array.isArray(theme)) { | ||
return React.createElement(context.Consumer, null, theme => { | ||
return React.createElement(context.Consumer, { | ||
WrappedComponent: Component | ||
}, theme => { | ||
const thisTheme = buildTheme(theme); | ||
@@ -72,0 +88,0 @@ return React.createElement(Component, _extends({ |
{ | ||
"name": "react-themed-too", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "CSS in React", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
27486
586
0