From 317cce9314ad78d90714dc55aa82a2c3dfa75d1a Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Thu, 08 Jun 2023 05:27:32 +0000
Subject: [PATCH] generic quartz component for layout
---
quartz/components/types.ts | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/quartz/components/types.ts b/quartz/components/types.ts
index 96ead5f..8d7a79c 100644
--- a/quartz/components/types.ts
+++ b/quartz/components/types.ts
@@ -1,6 +1,16 @@
-import { ComponentType } from "preact"
+import { ComponentType, JSX } from "preact"
+import { StaticResources } from "../resources"
+import { QuartzPluginData } from "../plugins/vfile"
+import { GlobalConfiguration } from "../cfg"
-export type QuartzComponent<Props> = ComponentType<Props> & {
+export type QuartzComponentProps = {
+ externalResources: StaticResources
+ fileData: QuartzPluginData
+ cfg: GlobalConfiguration
+ children: QuartzComponent[] | JSX.Element[]
+}
+
+export type QuartzComponent = ComponentType<QuartzComponentProps> & {
css?: string,
beforeDOMLoaded?: string,
afterDOMLoaded?: string,
--
Gitblit v1.10.0