refactor plugins to be functions instead of classes

This commit is contained in:
Jacky Zhao 2023-06-11 23:26:43 -07:00
parent b8c011410d
commit 352075ae81
20 changed files with 464 additions and 507 deletions
quartz/components

View file

@ -10,7 +10,6 @@ export type QuartzComponentProps = {
cfg: GlobalConfiguration
children: QuartzComponent[] | JSX.Element[]
tree: Node<QuartzPluginData>
position?: 'sidebar' | 'header' | 'body'
}
export type QuartzComponent = ComponentType<QuartzComponentProps> & {
@ -18,3 +17,5 @@ export type QuartzComponent = ComponentType<QuartzComponentProps> & {
beforeDOMLoaded?: string,
afterDOMLoaded?: string,
}
export type QuartzComponentConstructor<Options extends object> = (opts: Options) => QuartzComponent