diff --git a/src/components/Header.tsx b/src/components/Header.tsx new file mode 100644 index 0000000..7d2dd65 --- /dev/null +++ b/src/components/Header.tsx @@ -0,0 +1,103 @@ +import { useState, useEffect } from "react"; +import { Link } from "react-router-dom"; +import { Button } from "@/components/ui/button"; +import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet"; +import { Menu, Layers } from "lucide-react"; +import { ThemeToggle } from "@/components/ThemeToggle"; + +const navLinks = [ + { label: "Features", to: "/features" }, + { label: "Pricing", to: "/pricing" }, + { label: "About", to: "/about" }, + { label: "Blog", to: "/blog" }, + { label: "Contact", to: "/contact" }, + { label: "Dashboard", to: "/dashboard" }, +]; + +export default function Header() { + const [mobileOpen, setMobileOpen] = useState(false); + const [scrolled, setScrolled] = useState(false); + + useEffect(() => { + const onScroll = () => setScrolled(window.scrollY > 20); + window.addEventListener("scroll", onScroll); + return () => window.removeEventListener("scroll", onScroll); + }, []); + + return ( +
+
+ {/* Logo */} + +
+ +
+ + Nexus + + + + {/* Desktop Nav */} + + + {/* Right Actions */} +
+ + + +
+ + {/* Mobile Menu */} + + + + + +
+ {navLinks.map((l) => ( + setMobileOpen(false)} + className="text-sm font-medium text-slate-600 hover:text-slate-900 hover:bg-slate-50 rounded-lg px-4 py-3 transition-colors" + > + {l.label} + + ))} +
+ setMobileOpen(false)} className="text-sm font-medium text-slate-600 hover:text-slate-900 hover:bg-slate-50 rounded-lg px-4 py-3"> + Sign In + + +
+
+ + +
+
+ ); +}