Files
psalmtafel-webservice/components/NavItem.tsx
T
robin be9bd26c88 feat: add NavItem component
feat: add Header component with blur effect
feat: first steps into dark- and light-mode support
2026-07-24 16:37:58 +02:00

16 lines
471 B
TypeScript

"use client";
import Link from "next/link";
import { usePathname } from "next/navigation";
import { ReactNode } from "react";
export default function NavItem({ path, children }: { path: string; children: ReactNode }) {
const pathname = usePathname();
const isActive = pathname === path;
return (
<Link href={path} className={`px-3 py-1 rounded-full hover:bg-blue-300 ${isActive ? "underline" : ""}`}>
{children}
</Link>
);
}