UNPKG

easy-jsx-html-engine

Version:

Dead simple HTML engine using JSX syntax.

12 lines 517 B
/// <reference path="jsx/index.d.ts" preserve="true" /> /// <reference path="jsx/intrinsics.d.ts" preserve="true" /> import { createElement, Fragment } from "./index"; export function jsx(name, props) { if (typeof name === "function") { return name(props); } const { children, ...attrs } = props; return createElement(name, attrs, ...(!children ? [] : Array.isArray(children) ? children : [children])); } export { jsx as jsxs, jsx as jsxDEV, Fragment }; //# sourceMappingURL=jsx-runtime.js.map