@pronto-tools-and-more/components-renderer 5.3.1 → 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components-renderer",
3
- "version": "5.3.1",
3
+ "version": "5.4.0",
4
4
  "description": "",
5
5
  "main": "src/componentsRendererMain.js",
6
6
  "type": "module",
@@ -10,6 +10,13 @@ export const renderElement = (element) => {
10
10
  };
11
11
  }
12
12
  if (element.tag) {
13
+ if (typeof element.tag === "function") {
14
+ const vnode = element.tag({
15
+ ...element.props,
16
+ children: element.children,
17
+ });
18
+ return renderElement(vnode);
19
+ }
13
20
  const hasComplexChildren = HasComplexChildren.hasComplexChildren(element);
14
21
  const renderedChildren = hasComplexChildren
15
22
  ? element.children.map(renderElement)