| 1 | import Link from "next/link"; |
| 2 | import type { ReactNode |
| 3 | |
| 4 | export function TabLink({ |
| 5 | href, |
| 6 | active, |
| 7 | children, |
| 8 | }: { |
| 9 | href: string |
| 10 | active: boolean |
| 11 | children: ReactNode |
| 12 | }) { |
| 13 | return ( |
| 14 | <Link |
| 15 | href={href} |
| 16 | aria-current={active ? |
| 17 | data-active={active || |
| 18 | className="flex items-center gap-2 whitespace-nowrap border-b-2 border-transparent px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:text-foreground data-active:border-foreground data-active:font-medium data-active:text-foreground" |
| 19 | > |
| 20 | {children} |
| 21 | </Link> |
| 22 | ); |
| 23 | } |