rizaldy.club/quartz/components/pages/Content.tsx

12 lines
492 B
TypeScript
Raw Normal View History

import { htmlToJsx } from "../../util/jsx"
2023-07-01 14:03:01 +07:00
import { QuartzComponentConstructor, QuartzComponentProps } from "../types"
function Content({ fileData, tree }: QuartzComponentProps) {
const content = htmlToJsx(fileData.filePath!, tree)
const classes: string[] = fileData.frontmatter?.cssclasses ?? []
const classString = ["popover-hint", ...classes].join(" ")
return <article class={classString}>{content}</article>
2023-07-01 14:03:01 +07:00
}
2023-07-03 03:08:29 +07:00
export default (() => Content) satisfies QuartzComponentConstructor