onno-react
Advanced tools
Comparing version 0.4.7 to 0.4.8
@@ -113,5 +113,5 @@ "use strict" | ||
} | ||
Object.defineProperty(renderProps, "name", { value: name }) | ||
renderProps.type = "compose" | ||
renderProps.options = composedOptions | ||
renderProps.type = "compose" | ||
Object.defineProperty(renderProps, "name", { value: name }) | ||
return renderProps | ||
@@ -212,3 +212,6 @@ } | ||
const keys = isArray(styleKeys) ? styleKeys : propsKeys.slice(0, 1) | ||
const transformStyle = isArray(renderers) && interpolate({ name, renderers }) | ||
const transformer = | ||
isArray(renderers) && | ||
renderers.length > 0 && | ||
interpolate({ name, renderers }) | ||
if (isUndefined(styleKeys)) options.styleKeys = keys | ||
@@ -241,3 +244,3 @@ const renderValue = (value, theme) => { | ||
if (result) { | ||
if (transformStyle) result = transformStyle(result, theme) | ||
if (transformer) result = transformer(result, theme) | ||
if (query) result = { [query]: result } | ||
@@ -262,5 +265,6 @@ styles.push(result) | ||
} | ||
Object.defineProperty(renderProps, "name", { value: name }) | ||
renderProps.type = "style" | ||
renderProps.options = options | ||
renderProps.type = "style" | ||
Object.defineProperty(renderProps, "name", { value: name }) | ||
if (transformer) renderProps.transformer = transformer | ||
return renderProps | ||
@@ -267,0 +271,0 @@ } |
@@ -109,5 +109,5 @@ import { oneOfType, number, string, objectOf, arrayOf } from "prop-types" | ||
} | ||
Object.defineProperty(renderProps, "name", { value: name }) | ||
renderProps.type = "compose" | ||
renderProps.options = composedOptions | ||
renderProps.type = "compose" | ||
Object.defineProperty(renderProps, "name", { value: name }) | ||
return renderProps | ||
@@ -208,3 +208,6 @@ } | ||
const keys = isArray(styleKeys) ? styleKeys : propsKeys.slice(0, 1) | ||
const transformStyle = isArray(renderers) && interpolate({ name, renderers }) | ||
const transformer = | ||
isArray(renderers) && | ||
renderers.length > 0 && | ||
interpolate({ name, renderers }) | ||
if (isUndefined(styleKeys)) options.styleKeys = keys | ||
@@ -237,3 +240,3 @@ const renderValue = (value, theme) => { | ||
if (result) { | ||
if (transformStyle) result = transformStyle(result, theme) | ||
if (transformer) result = transformer(result, theme) | ||
if (query) result = { [query]: result } | ||
@@ -258,5 +261,6 @@ styles.push(result) | ||
} | ||
Object.defineProperty(renderProps, "name", { value: name }) | ||
renderProps.type = "style" | ||
renderProps.options = options | ||
renderProps.type = "style" | ||
Object.defineProperty(renderProps, "name", { value: name }) | ||
if (transformer) renderProps.transformer = transformer | ||
return renderProps | ||
@@ -263,0 +267,0 @@ } |
{ | ||
"name": "onno-react", | ||
"license": "MIT", | ||
"version": "0.4.7", | ||
"version": "0.4.8", | ||
"homepage": "https://onnojs.com", | ||
@@ -30,6 +30,6 @@ "description": "Onno propTypes for React", | ||
"@types/prop-types": "15.7.1", | ||
"onno": "0.4.7", | ||
"onno": "0.4.8", | ||
"prop-types": "15.7.2" | ||
}, | ||
"gitHead": "89ef42b92731ae98e7e826a8afdc7faa4aeb464a" | ||
"gitHead": "84782b7f262584deebeb68171a3b7ad03bc50885" | ||
} |
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
59479
2202
+ Addedonno@0.4.8(transitive)
- Removedonno@0.4.7(transitive)
Updatedonno@0.4.8