css-in-props
Advanced tools
Comparing version 2.10.220 to 2.10.222
@@ -27,2 +27,4 @@ "use strict"; | ||
const { css } = import_emotion.emotion; | ||
const transformEmotion = (props, callback) => (0, import_utils.isFunction)(callback) ? callback(props) : css(props); | ||
const transformEmotion = (props, callback) => { | ||
return (0, import_utils.isFunction)(callback) ? callback(props) : css(props); | ||
}; |
@@ -27,6 +27,10 @@ "use strict"; | ||
var import_registry = require("./registry"); | ||
const transformClassname = (props, context = {}, registry = import_registry.CSS_PROPS_REGISTRY, excludedProps = {}, fakeElement) => { | ||
const transformClassname = (props, context = {}, registry = import_registry.CSS_PROPS_REGISTRY, excludedProps = {}, element) => { | ||
const CLASS_NAMES = {}; | ||
if (!(0, import_utils.isObject)(props)) | ||
return; | ||
(0, import_utils.merge)(element.class, registry); | ||
if (Object.keys(registry)[0] !== Object.keys(import_registry.CSS_PROPS_REGISTRY)[0]) { | ||
(0, import_utils.merge)(element.class, import_registry.CSS_PROPS_REGISTRY); | ||
} | ||
for (const key in props) { | ||
@@ -36,3 +40,3 @@ const setter = import_atoms.keySetters[key.slice(0, 1)]; | ||
if (setter) | ||
setter(key, props[key], CLASS_NAMES, fakeElement); | ||
setter(key, props[key], CLASS_NAMES, element, true); | ||
else if ((0, import_utils.isFunction)(hasCSS)) { | ||
@@ -39,0 +43,0 @@ const stack = hasCSS({ props, context }); |
@@ -5,3 +5,3 @@ { | ||
"author": "symbo.ls", | ||
"version": "2.10.220", | ||
"version": "2.10.222", | ||
"repository": "https://github.com/symbo-ls/smbls", | ||
@@ -34,3 +34,3 @@ "type": "module", | ||
}, | ||
"gitHead": "847aeea5ab044ded1909a4463c460b9bcf9c6db9" | ||
"gitHead": "19be332de3fa3f52a7e1df13240c5a03b122b6ba" | ||
} |
@@ -7,2 +7,4 @@ 'use strict' | ||
export const transformEmotion = (props, callback) => isFunction(callback) ? callback(props) : css(props) | ||
export const transformEmotion = (props, callback) => { | ||
return isFunction(callback) ? callback(props) : css(props) | ||
} |
@@ -8,6 +8,11 @@ 'use strict' | ||
export const transformClassname = (props, context = {}, registry = CSS_PROPS_REGISTRY, excludedProps = {}, fakeElement) => { | ||
export const transformClassname = (props, context = {}, registry = CSS_PROPS_REGISTRY, excludedProps = {}, element) => { | ||
const CLASS_NAMES = {} | ||
if (!isObject(props)) return | ||
merge(element.class, registry) | ||
if (Object.keys(registry)[0] !== Object.keys(CSS_PROPS_REGISTRY)[0]) { | ||
merge(element.class, CSS_PROPS_REGISTRY) | ||
} | ||
for (const key in props) { | ||
@@ -17,3 +22,3 @@ const setter = keySetters[key.slice(0, 1)] | ||
if (setter) setter(key, props[key], CLASS_NAMES, fakeElement) | ||
if (setter) setter(key, props[key], CLASS_NAMES, element, true) | ||
else if (isFunction(hasCSS)) { | ||
@@ -30,3 +35,4 @@ const stack = hasCSS({ props, context }) | ||
} | ||
return CLASS_NAMES | ||
} |
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
11512
247