From bcb5b2df09cb8c8fc0736ec476b2486f9b4643be Mon Sep 17 00:00:00 2001
From: Emile Bangma <ewjbangma@hotmail.com>
Date: Mon, 04 Mar 2024 17:52:28 +0000
Subject: [PATCH] feat(frontmatter): configure max length for description (#946)

---
 quartz/components/Header.tsx |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/quartz/components/Header.tsx b/quartz/components/Header.tsx
index 197c4e5..eba17ae 100644
--- a/quartz/components/Header.tsx
+++ b/quartz/components/Header.tsx
@@ -1,9 +1,7 @@
-import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
+import { QuartzComponent, QuartzComponentConstructor, QuartzComponentProps } from "./types"
 
-function Header({ children }: QuartzComponentProps) {
-  return <header>
-    {children}
-  </header>
+const Header: QuartzComponent = ({ children }: QuartzComponentProps) => {
+  return children.length > 0 ? <header>{children}</header> : null
 }
 
 Header.css = `
@@ -11,12 +9,11 @@
   display: flex;
   flex-direction: row;
   align-items: center;
-  margin: 1em 0 2em 0;
-  & > h1 {
-  }
+  margin: 2rem 0;
+  gap: 1.5rem;
 }
 
-header > h1 {
+header h1 {
   margin: 0;
   flex: auto;
 }

--
Gitblit v1.10.0