From 2c06e68ba6ccc5b079ca6ec96cc6e08c082d9fd8 Mon Sep 17 00:00:00 2001
From: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date: Tue, 13 Feb 2024 05:21:30 +0000
Subject: [PATCH] chore(deps): bump preact from 10.19.3 to 10.19.4 (#858)
---
quartz/components/Header.tsx | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/quartz/components/Header.tsx b/quartz/components/Header.tsx
index 229e210..5281f72 100644
--- a/quartz/components/Header.tsx
+++ b/quartz/components/Header.tsx
@@ -1,14 +1,22 @@
-import { resolveToRoot } from "../path"
+import { QuartzComponentConstructor, QuartzComponentProps } from "./types"
-export interface HeaderProps {
- title: string
- slug: string
+function Header({ children }: QuartzComponentProps) {
+ return children.length > 0 ? <header>{children}</header> : null
}
-export function Component({ title, slug }: HeaderProps) {
- const baseDir = resolveToRoot(slug)
- return <header>
- <h1><a href={baseDir}>{title}</a></h1>
- </header>
+Header.css = `
+header {
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ margin: 2rem 0;
+ gap: 1.5rem;
}
+header h1 {
+ margin: 0;
+ flex: auto;
+}
+`
+
+export default (() => Header) satisfies QuartzComponentConstructor
--
Gitblit v1.10.0