From 8fd75ffbfda30edd5a134a1fbf9b81ac3cebb2ff Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Mon, 24 Jul 2023 00:42:00 +0000
Subject: [PATCH] support attachments folder
---
quartz/components/types.ts | 20 +++++++++++++++-----
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/quartz/components/types.ts b/quartz/components/types.ts
index 8d7a79c..803ada9 100644
--- a/quartz/components/types.ts
+++ b/quartz/components/types.ts
@@ -2,16 +2,26 @@
import { StaticResources } from "../resources"
import { QuartzPluginData } from "../plugins/vfile"
import { GlobalConfiguration } from "../cfg"
+import { Node } from "hast"
export type QuartzComponentProps = {
externalResources: StaticResources
fileData: QuartzPluginData
cfg: GlobalConfiguration
- children: QuartzComponent[] | JSX.Element[]
-}
+ children: (QuartzComponent | JSX.Element)[]
+ tree: Node<QuartzPluginData>
+ allFiles: QuartzPluginData[]
+ displayClass?: "mobile-only" | "desktop-only"
+} & JSX.IntrinsicAttributes & {
+ [key: string]: any
+ }
export type QuartzComponent = ComponentType<QuartzComponentProps> & {
- css?: string,
- beforeDOMLoaded?: string,
- afterDOMLoaded?: string,
+ css?: string
+ beforeDOMLoaded?: string
+ afterDOMLoaded?: string
}
+
+export type QuartzComponentConstructor<Options extends object | undefined = undefined> = (
+ opts: Options,
+) => QuartzComponent
--
Gitblit v1.10.0