2023-08-21 06:22:37 +00:00
|
|
|
import type { HtmlEscapedString } from '../utils/html.ts'
|
2022-07-24 08:36:37 +00:00
|
|
|
import { jsx } from './index.ts'
|
2022-08-03 02:24:51 +00:00
|
|
|
import type { JSXNode } from './index.ts'
|
2022-11-01 12:41:27 +00:00
|
|
|
export { Fragment } from './index.ts'
|
2022-07-24 08:36:37 +00:00
|
|
|
|
2022-12-02 02:28:49 +00:00
|
|
|
export function jsxDEV(tag: string | Function, props: Record<string, unknown>): JSXNode {
|
2023-05-05 01:46:49 +00:00
|
|
|
const children = (props.children ?? []) as string | HtmlEscapedString
|
2022-07-24 08:36:37 +00:00
|
|
|
delete props['children']
|
2023-05-05 01:46:49 +00:00
|
|
|
return Array.isArray(children) ? jsx(tag, props, ...children) : jsx(tag, props, children)
|
2022-07-24 08:36:37 +00:00
|
|
|
}
|