From 3ac6b42e16dca5a44ed3fec2c0314f1dbbc2322b Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sun, 16 Jul 2023 06:02:12 +0000
Subject: [PATCH] finish path refactoring, add sourcemap + better trace support
---
quartz/components/Header.tsx | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/quartz/components/Header.tsx b/quartz/components/Header.tsx
index 8b06863..0f13ca2 100644
--- a/quartz/components/Header.tsx
+++ b/quartz/components/Header.tsx
@@ -1,9 +1,9 @@
-import { QuartzComponentProps } from "./types"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
-export default function Header({ children }: QuartzComponentProps) {
- return <header>
+function Header({ children }: QuartzComponentProps) {
+ return (children.length > 0) ? <header>
{children}
- </header>
+ </header> : null
}
Header.css = `
@@ -11,13 +11,14 @@
display: flex;
flex-direction: row;
align-items: center;
- margin: 1em 0 2em 0;
- & > h1 {
- }
+ margin: 2em 0;
+ gap: 1.5rem;
}
-header > h1 {
+header h1 {
margin: 0;
flex: auto;
}
`
+
+export default (() => Header) satisfies QuartzComponentConstructor
--
Gitblit v1.10.0