Comparing version 5.0.0 to 5.1.0
@@ -11,6 +11,9 @@ 'use strict'; | ||
// many css-in-js libs process keyframes objects as the value for `animationName` | ||
var defaultObjectPropsWhitelist = ['animationName']; | ||
var defaultPropsDecorator = function defaultPropsDecorator(_ref) { | ||
var style = _ref.style, | ||
className = _ref.className; | ||
return _extends({}, style ? { style: (0, _pickStyles.pickDirectStyles)(style) } : {}, className ? { className: className } : {}); | ||
return _extends({}, style ? { style: (0, _pickStyles.pickDirectStyles)(style, defaultObjectPropsWhitelist) } : {}, className ? { className: className } : {}); | ||
}; | ||
@@ -17,0 +20,0 @@ |
@@ -21,2 +21,4 @@ 'use strict'; | ||
var pickDirectStyles = exports.pickDirectStyles = function pickDirectStyles(style) { | ||
var objectPropertiesWhitelist = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; | ||
var styleKeys = (0, _lodash.keys)(style); | ||
@@ -28,3 +30,4 @@ var result = {}; | ||
key[0] === ':' || // pseudo selectors | ||
key[0] === '@' // @media / @keyframes / @supports / @font-face | ||
key[0] === '@' || // @media / @keyframes / @supports / @font-face | ||
objectPropertiesWhitelist.indexOf(key) >= 0 // whitelisted object-type properties | ||
; | ||
@@ -31,0 +34,0 @@ if (isDirect) { |
{ | ||
"name": "substyle", | ||
"version": "5.0.0", | ||
"version": "5.1.0", | ||
"description": "Universal styling for reusable React components", | ||
@@ -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
39544
305