mirror of
https://github.com/honojs/hono.git
synced 2024-12-01 11:51:01 +01:00
e07019125d
* 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
11 lines
455 B
TypeScript
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)
|
|
}
|