react-fela
Advanced tools
Comparing version 10.1.3 to 10.2.0
@@ -0,1 +1,2 @@ | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
@@ -12,6 +13,10 @@ // $FlowFixMe | ||
var renderer = useContext(RendererContext); | ||
var theme = useContext(ThemeContext); | ||
var theme = useContext(ThemeContext) || {}; | ||
var propsWithTheme = _extends({}, props, { | ||
theme: theme | ||
}); | ||
function css() { | ||
return renderer.renderRule(combineRules.apply(undefined, arguments), props); | ||
return renderer.renderRule(combineRules.apply(undefined, arguments), propsWithTheme); | ||
} | ||
@@ -18,0 +23,0 @@ |
@@ -6,2 +6,7 @@ 'use strict'; | ||
}); | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
// $FlowFixMe | ||
exports.default = useFela; | ||
@@ -19,6 +24,10 @@ | ||
var renderer = (0, _react.useContext)(_context.RendererContext); | ||
var theme = (0, _react.useContext)(_context.ThemeContext); | ||
var theme = (0, _react.useContext)(_context.ThemeContext) || {}; | ||
var propsWithTheme = _extends({}, props, { | ||
theme: theme | ||
}); | ||
function css() { | ||
return renderer.renderRule(_fela.combineRules.apply(undefined, arguments), props); | ||
return renderer.renderRule(_fela.combineRules.apply(undefined, arguments), propsWithTheme); | ||
} | ||
@@ -31,3 +40,2 @@ | ||
}; | ||
} | ||
// $FlowFixMe | ||
} |
{ | ||
"name": "react-fela", | ||
"version": "10.1.3", | ||
"version": "10.2.0", | ||
"description": "React bindings for Fela", | ||
@@ -31,7 +31,7 @@ "typings": "index.d.ts", | ||
"dependencies": { | ||
"fela-bindings": "^10.1.3", | ||
"fela-dom": "^10.1.3", | ||
"fela-bindings": "^10.2.0", | ||
"fela-dom": "^10.2.0", | ||
"prop-types": "^15.5.8" | ||
}, | ||
"gitHead": "05e0b56bc70926e5389114720066d0ce02bf68ec" | ||
"gitHead": "2271df3339a3c3a22e8fd4c457f5cc5a1729a1a8" | ||
} |
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
89274
836
Updatedfela-bindings@^10.2.0
Updatedfela-dom@^10.2.0