wiki/quartz/components/Header.tsx

15 lines
278 B
TypeScript
Raw Normal View History

2023-06-01 23:05:14 +00:00
import { resolveToRoot } from "../path"
export interface HeaderProps {
title: string
slug: string
}
2023-06-03 19:07:19 +00:00
export function Component({ title, slug }: HeaderProps) {
2023-06-01 23:05:14 +00:00
const baseDir = resolveToRoot(slug)
return <header>
<h1><a href={baseDir}>{title}</a></h1>
</header>
}
2023-06-03 19:07:19 +00:00