mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-30 06:56:22 +00:00
b211d49922
* Add cssclasses to article * Prettier * Update quartz/components/pages/Content.tsx * Update quartz/components/pages/Content.tsx --------- Co-authored-by: Jacky Zhao <j.zhao2k19@gmail.com>
11 lines
492 B
TypeScript
11 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
|