0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 10:51:01 +00:00
hono/deno_dist/jsx/jsx-dev-runtime.ts

11 lines
455 B
TypeScript
Raw Normal View History

import type { HtmlEscapedString } from '../utils/html.ts'
import { jsx } from './index.ts'
import type { JSXNode } from './index.ts'
2022-11-01 12:41:27 +00:00
export { Fragment } from './index.ts'
export function jsxDEV(tag: string | Function, props: Record<string, unknown>): JSXNode {
const children = (props.children ?? []) as string | HtmlEscapedString
delete props['children']
return Array.isArray(children) ? jsx(tag, props, ...children) : jsx(tag, props, children)
}