2023-07-01 10:03:01 +03:00
|
|
|
import { QuartzComponentConstructor, QuartzComponentProps } from "../types"
|
|
|
|
import { Fragment, jsx, jsxs } from 'preact/jsx-runtime'
|
|
|
|
import { toJsxRuntime } from "hast-util-to-jsx-runtime"
|
|
|
|
|
|
|
|
function Content({ tree }: QuartzComponentProps) {
|
|
|
|
// @ts-ignore (preact makes it angry)
|
|
|
|
const content = toJsxRuntime(tree, { Fragment, jsx, jsxs, elementAttributeNameCase: 'html' })
|
2023-07-02 23:08:29 +03:00
|
|
|
return <article class="popover-hint">{content}</article>
|
2023-07-01 10:03:01 +03:00
|
|
|
}
|
|
|
|
|
2023-07-02 23:08:29 +03:00
|
|
|
export default (() => Content) satisfies QuartzComponentConstructor
|