html-element-to-react
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -41,2 +41,6 @@ "use strict"; | ||
} | ||
if (k === "src") { | ||
props[k] = el[k]; | ||
} | ||
} | ||
@@ -59,2 +63,4 @@ | ||
children.push(_react["default"].createElement.apply(_react["default"], [el.tagName.toLowerCase(), props === {} ? null : props].concat(_toConsumableArray(getChildren(el.children))))); | ||
} else if (el.tagName.toLowerCase() === 'img') { | ||
children.push(_react["default"].createElement(el.tagName.toLowerCase(), props === {} ? null : props)); | ||
} else if (el.textContent) { | ||
@@ -69,2 +75,4 @@ children.push(_react["default"].createElement(el.tagName.toLowerCase(), props === {} ? null : props, el.textContent)); | ||
var convert = function convert(domElement) { | ||
if (!domElement) return null; | ||
var props = _objectSpread({}, getProps(domElement)); | ||
@@ -71,0 +79,0 @@ |
{ | ||
"name": "html-element-to-react", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"description": "Convert HTML DOM elements to React elements", | ||
@@ -5,0 +5,0 @@ "main": "dist/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
5370
56