magricambi/src/components/Navbar.tsx
AV77web c66ee44f36
All checks were successful
Deploy to VPS / build (push) Successful in 38s
Deploy to VPS / deploy (push) Successful in 28s
selettore stabilimento unico per macchine e articoli
2026-05-29 16:08:27 +02:00

66 lines
2.2 KiB
TypeScript

//====================================
// File: Navbar.tsx
// componente Navbar
// @author: "villari.andrea@libero.it"
// @version: "1.0.0 2026-05-07"
//====================================
"use client"
import { useState , MouseEvent, ReactNode} from "react";
import Link from "next/link";
import GlobalStabilimentoSelector from "./GlobalStabilimentoSelector";
interface NavLink {
href: string;
label: string;
}
const navLinks: NavLink[] = [
{ href: "/", label: "Home"},
{ href: "/movimenti", label: "Movimenti"},
{ href: "/articoli", label: "Articoli"},
{ href: "/macchine", label: "Macchine"},
{ href: "/utenti", label: "Utenti"},
];
export default function Navbar({ actions }: { actions?: ReactNode }) {
return (
<nav className="border-b border-zinc-800 bg-black">
<div className="max-w-7xl mx-auto px-4">
<div className="flex items-center justify-between h-14">
{/* Logo */}
<Link
href="/"
className="flex items-center font-bold text-zinc-100 hover:text-zinc-300 transition-colors"
>
LOGO
</Link>
{/* Navigation Links */}
<div className="flex items-center space-x-6">
{navLinks.map((link) => (
<Link
key={link.href}
href={link.href}
className="text-sm text-zinc-300 hover:text-zinc-100 transition-colors"
>
{link.label}
</Link>
))}
</div>
{/* Stabilimento Selector */}
<div className="flex-1 flex justify-center px-4">
<GlobalStabilimentoSelector />
</div>
{/* Actions */}
{actions ? (
<div className="flex items-center">
{actions}
</div>
) : null}
</div>
</div>
</nav>
);
}