Jacky Zhao
2023-06-08 59109a8c1d505f516d50d6b7f88cfe070bc1ca84
quartz/components/Header.tsx
@@ -1,14 +1,10 @@
import { resolveToRoot } from "../path"
import style from './styles/header.scss'
import { QuartzComponentProps } from "./types"
export interface HeaderProps {
  title: string
  slug: string
}
export default function({ title, slug }: HeaderProps) {
  const baseDir = resolveToRoot(slug)
export default function Header({ children }: QuartzComponentProps) {
  return <header>
    <h1><a href={baseDir}>{title}</a></h1>
    {children}
  </header>
}
Header.css = style