jsx-dom-cjs
Advanced tools
Comparing version 8.1.3 to 8.1.4
18
index.js
@@ -269,3 +269,7 @@ /* eslint-disable */ | ||
const instance = new Class(attr); | ||
return instance.render(); | ||
const node = instance.render(); | ||
if ("ref" in attr) { | ||
attachRef(attr.ref, instance); | ||
} | ||
return node; | ||
} | ||
@@ -631,6 +635,10 @@ | ||
const css = | ||
list | ||
.slice(0, lastIndex) | ||
.reduce((p, s, i) => p + s + interpolations[i](props), "") + | ||
list[lastIndex]; | ||
list.slice(0, lastIndex).reduce((p, s, i) => { | ||
const interpolation = interpolations[i]; | ||
const current = | ||
typeof interpolation === "function" | ||
? interpolation(props) | ||
: interpolation; | ||
return p + s + current; | ||
}, "") + list[lastIndex]; | ||
return createElement(name, { | ||
@@ -637,0 +645,0 @@ style: [css, style], |
@@ -130,3 +130,7 @@ /* eslint-disable */ | ||
const instance = new Class(attr); | ||
return instance.render(); | ||
const node = instance.render(); | ||
if ("ref" in attr) { | ||
attachRef(attr.ref, instance); | ||
} | ||
return node; | ||
} | ||
@@ -455,6 +459,10 @@ | ||
const css = | ||
list | ||
.slice(0, lastIndex) | ||
.reduce((p, s, i) => p + s + interpolations[i](props), "") + | ||
list[lastIndex]; | ||
list.slice(0, lastIndex).reduce((p, s, i) => { | ||
const interpolation = interpolations[i]; | ||
const current = | ||
typeof interpolation === "function" | ||
? interpolation(props) | ||
: interpolation; | ||
return p + s + current; | ||
}, "") + list[lastIndex]; | ||
return createElement(name, { | ||
@@ -461,0 +469,0 @@ style: [css, style], |
{ | ||
"name": "jsx-dom-cjs", | ||
"version": "8.1.3", | ||
"version": "8.1.4", | ||
"description": "JSX to document.createElement.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,3 +7,3 @@ import type { FunctionComponent, JSX, StyleInput } from "./index" | ||
template: TemplateStringsArray, | ||
...interpolations: InterpolationFunction<InherentProps & AdditionalProps>[] | ||
...interpolations: (InterpolationFunction<InherentProps & AdditionalProps> | string | number)[] | ||
) => FunctionComponent<InherentProps & AdditionalProps> | ||
@@ -18,3 +18,3 @@ | ||
template: TemplateStringsArray, | ||
...interpolations: InterpolationFunction<Props>[] | ||
...interpolations: (InterpolationFunction<Props> | string | number)[] | ||
) => FunctionComponent< | ||
@@ -21,0 +21,0 @@ Omit<Props, "style"> & { |
Sorry, the diff of this file is too big to display
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
141570
3566