2023-06-12 06:46:38 +00:00
|
|
|
import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
|
2023-06-10 06:06:02 +00:00
|
|
|
import { Fragment, jsx, jsxs } from 'preact/jsx-runtime'
|
|
|
|
import { toJsxRuntime } from "hast-util-to-jsx-runtime"
|
|
|
|
|
2023-06-12 06:46:38 +00:00
|
|
|
function Content({ tree }: QuartzComponentProps) {
|
2023-06-10 06:06:02 +00:00
|
|
|
// @ts-ignore (preact makes it angry)
|
|
|
|
const content = toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: 'html' })
|
|
|
|
return content
|
|
|
|
}
|
2023-06-12 06:46:38 +00:00
|
|
|
|
|
|
|
export default (() => Content) satisfies QuartzComponentConstructor
|