rizaldy.club/quartz/components/types.ts

21 lines
613 B
TypeScript
Raw Normal View History

2023-06-08 12:27:32 +07:00
import { ComponentType, JSX } from "preact"
import { StaticResources } from "../resources"
import { QuartzPluginData } from "../plugins/vfile"
import { GlobalConfiguration } from "../cfg"
2023-06-10 13:06:02 +07:00
import { Node } from "hast"
2023-06-04 02:07:19 +07:00
2023-06-08 12:27:32 +07:00
export type QuartzComponentProps = {
externalResources: StaticResources
fileData: QuartzPluginData
cfg: GlobalConfiguration
children: QuartzComponent[] | JSX.Element[]
2023-06-10 13:06:02 +07:00
tree: Node<QuartzPluginData>
position?: 'sidebar' | 'header' | 'body'
2023-06-08 12:27:32 +07:00
}
export type QuartzComponent = ComponentType<QuartzComponentProps> & {
2023-06-04 02:07:19 +07:00
css?: string,
beforeDOMLoaded?: string,
afterDOMLoaded?: string,
}