Files
Sloneczko/components/header.tsx
Kazimierz Ciołek 704edb6ae0 Initialize repo
2026-02-02 13:44:55 +01:00

80 lines
2.8 KiB
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use client";
import { useState } from "react";
import { Menu, X } from "lucide-react";
import { Button } from "@/components/ui/button";
const navLinks = [
{ href: "#about", label: "O obiekcie" },
{ href: "#gallery", label: "Galeria" },
{ href: "#amenities", label: "Wyposażenie" },
{ href: "#pricing", label: "Cennik" },
{ href: "#location", label: "Lokalizacja" },
{ href: "#contact", label: "Kontakt" },
];
export function Header() {
const [mobileMenuOpen, setMobileMenuOpen] = useState(false);
return (
<header className="fixed top-0 left-0 right-0 z-50 bg-background/80 backdrop-blur-md border-b border-border">
<div className="container mx-auto px-6 py-4">
<div className="flex items-center justify-between">
<a href="#" className="flex items-center gap-3 group">
<div className="w-10 h-10 rounded-full bg-accent flex items-center justify-center transition-transform group-hover:scale-110">
<span className="text-lg"></span>
</div>
<div>
<h1 className="font-serif text-xl font-bold text-foreground tracking-tight">
SŁONECZKO
</h1>
<p className="text-xs text-muted-foreground tracking-wide uppercase">
Domki Letniskowe
</p>
</div>
</a>
<nav className="hidden md:flex items-center gap-8">
{navLinks.map((link) => (
<a
key={link.href}
href={link.href}
className="text-sm text-muted-foreground hover:text-foreground transition-colors relative after:absolute after:bottom-0 after:left-0 after:w-0 after:h-px after:bg-primary hover:after:w-full after:transition-all"
>
{link.label}
</a>
))}
</nav>
<Button
variant="ghost"
size="icon"
className="md:hidden"
onClick={() => setMobileMenuOpen(!mobileMenuOpen)}
aria-label={mobileMenuOpen ? "Zamknij menu" : "Otwórz menu"}
>
{mobileMenuOpen ? <X className="w-5 h-5" /> : <Menu className="w-5 h-5" />}
</Button>
</div>
{mobileMenuOpen && (
<nav className="md:hidden pt-4 pb-2 border-t border-border mt-4">
<div className="flex flex-col gap-4">
{navLinks.map((link) => (
<a
key={link.href}
href={link.href}
onClick={() => setMobileMenuOpen(false)}
className="text-sm text-muted-foreground hover:text-foreground transition-colors py-2"
>
{link.label}
</a>
))}
</div>
</nav>
)}
</div>
</header>
);
}