Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

Header.tsx

22 lines630 Bytes

1import { Link } from '@tanstack/solid-router'
2​
3const HeaderLink: typeof Link = (props) => {
4 return <Link class="text-lg text-blue-700" {...props} />
5}
6​
7export interface HeaderProps {
8 readonly title: string
9}
10​
11export const Header = ({ title }: HeaderProps) => {
12 return (
13 <header class="flex items-end gap-8 border-b-2 border-slate-150 py-4">
14 <h1 class="text-4xl">{title}</h1>
15 <nav class="flex gap-4">
16 <HeaderLink to="/users/zod">Zod</HeaderLink>
17 <HeaderLink to="/users/valibot">Valibot</HeaderLink>
18 <HeaderLink to="/users/arktype">Arktype</HeaderLink>
19 </nav>
20 </header>
21 )