jpg-quartz/quartz/components/pages/Content.tsx

12 lines
529 B
TypeScript
Raw Normal View History

import { htmlToJsx } from "../../util/jsx"
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "../types"
2023-07-01 07:03:01 +00:00
const Content: QuartzComponent = ({ 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 07:03:01 +00:00
}
2023-07-02 20:08:29 +00:00
export default (() => Content) satisfies QuartzComponentConstructor