quartz-research-note/quartz/components/pages/Content.tsx
Tomoya Matsuura(MacBookPro) 312a2330c3
All checks were successful
Build / build (push) Successful in 2m11s
merge
2024-02-05 19:45:36 +09:00

12 lines
492 B
TypeScript

import { htmlToJsx } from "../../util/jsx"
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>
}
export default (() => Content) satisfies QuartzComponentConstructor