gongxiangp2/components/department-dashboard/WorkspaceViewNavigation.tsx

17 lines
747 B
TypeScript

import Link from 'next/link'
type ViewLink = { label: string; href: string; active: boolean }
export default function WorkspaceViewNavigation({ label, items }: { label: string; items: ViewLink[] }) {
return (
<nav aria-label={label} className="flex min-w-0 gap-1">
{items.map((item) => (
<Link key={item.href} href={item.href} scroll={false} aria-current={item.active ? 'page' : undefined}
className={`inline-flex min-h-11 items-center justify-center rounded-lg px-4 text-sm font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#1677ff] ${item.active ? 'bg-[#e6f4ff] text-[#0050cb]' : 'text-[#4f6077] hover:bg-white'}`}>
{item.label}
</Link>
))}
</nav>
)
}