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

Header.tsx

23 lines702 Bytes

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