| | |
| | | import { ComponentChildren } from "preact" |
| | | import { htmlToJsx } from "../../util/jsx" |
| | | import { QuartzComponentConstructor, QuartzComponentProps } from "../types" |
| | | import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "../types" |
| | | |
| | | function Content({ fileData, tree }: QuartzComponentProps) { |
| | | const content = htmlToJsx(fileData.filePath!, tree) |
| | | return <article class="popover-hint">{content}</article> |
| | | const Content: QuartzComponent = ({ fileData, tree }: QuartzComponentProps) => { |
| | | const content = htmlToJsx(fileData.filePath!, tree) as ComponentChildren |
| | | const classes: string[] = fileData.frontmatter?.cssclasses ?? [] |
| | | const classString = ["popover-hint", ...classes].join(" ") |
| | | return <article class={classString}>{content}</article> |
| | | } |
| | | |
| | | export default (() => Content) satisfies QuartzComponentConstructor |