forked from github/quartz
feat(bases): migrate from vault to upstream
Signed-off-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
22
quartz/components/pages/BaseContent.tsx
Normal file
22
quartz/components/pages/BaseContent.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "../types"
|
||||
import style from "../styles/basePage.scss"
|
||||
import { htmlToJsx } from "../../util/jsx"
|
||||
|
||||
export default (() => {
|
||||
const BaseContent: QuartzComponent = (props: QuartzComponentProps) => {
|
||||
const { fileData, tree } = props
|
||||
|
||||
return (
|
||||
<div class="popover-hint">
|
||||
<article
|
||||
class={["base-content", ...(fileData.frontmatter?.cssclasses ?? [])].join(" ")}
|
||||
>
|
||||
{htmlToJsx(fileData.filePath!, fileData.basesRenderedTree ?? tree)}
|
||||
</article>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
BaseContent.css = style
|
||||
return BaseContent
|
||||
}) satisfies QuartzComponentConstructor
|
||||
Reference in New Issue
Block a user