0
0
mirror of https://github.com/honojs/hono.git synced 2024-12-01 11:51:01 +01:00
hono/deno_dist/jsx/jsx-dev-runtime.ts
Yusuke Wada e07019125d
feat: introduce "Helpers" (#1353)
* mv jsx

* introduce helper

* denoify & add src/helper.ts for Deno

* remove `c` not used

* remove `c` in lagon test

* remove `src/adapter.ts` not used
2023-08-21 15:22:37 +09:00

11 lines
455 B
TypeScript

import type { HtmlEscapedString } from '../utils/html.ts'
import { jsx } from './index.ts'
import type { JSXNode } from './index.ts'
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)
}