DenReg/jsx-html/mod.ts
Fabian Stamm 1b2d85eeef
All checks were successful
continuous-integration/drone/push Build is passing
Adding hotfixes for packages
2020-10-14 02:56:11 +02:00

28 lines
646 B
TypeScript

import { jsx, Fragment } from './jsx.ts';
import type {
ComponentFunctionType,
NodePropsType,
NullableChildType,
} from './types.ts';
export { ElementNode } from './node/ElementNode.ts';
export { ComponentNode } from './node/ComponentNode.ts';
export type {
jsx,
Fragment,
ComponentFunctionType,
NullableChildType,
NodePropsType,
};
export const React = {
Fragment,
createElement<P extends NodePropsType = NodePropsType>(
element: string | ComponentFunctionType,
props: P | null,
...children: NullableChildType[]
) {
return jsx(element, props, ...children);
},
};