105 lines
3.6 KiB
TypeScript
105 lines
3.6 KiB
TypeScript
|
|
import { useState } from "react";
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
export function NavBar() {
|
|
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
|
|
|
|
const toggleMobileMenu = () => {
|
|
setIsMobileMenuOpen(!isMobileMenuOpen);
|
|
};
|
|
|
|
return (
|
|
<header className="fixed top-0 left-0 right-0 z-50 bg-white/80 backdrop-blur-md border-b border-gray-100">
|
|
<div className="container px-4 md:px-6 flex h-16 items-center justify-between">
|
|
<div className="flex items-center gap-2">
|
|
<a href="#" className="text-xl font-bold text-gray-900">
|
|
DentalMatch
|
|
</a>
|
|
</div>
|
|
|
|
{/* Desktop Navigation */}
|
|
<nav className="hidden md:flex items-center gap-6">
|
|
<a href="#features" className="text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors">
|
|
Features
|
|
</a>
|
|
<a href="#benefits" className="text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors">
|
|
Benefits
|
|
</a>
|
|
<a href="#about" className="text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors">
|
|
About
|
|
</a>
|
|
<a href="#download" className="text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors">
|
|
Download
|
|
</a>
|
|
</nav>
|
|
|
|
{/* CTA Button */}
|
|
<div className="hidden md:block">
|
|
<Button className="bg-blue-600 text-white hover:bg-blue-700">
|
|
Get Started
|
|
</Button>
|
|
</div>
|
|
|
|
{/* Mobile Menu Button */}
|
|
<button
|
|
className="md:hidden focus:outline-none"
|
|
onClick={toggleMobileMenu}
|
|
>
|
|
<svg
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
fill="none"
|
|
viewBox="0 0 24 24"
|
|
stroke="currentColor"
|
|
className="h-6 w-6 text-gray-900"
|
|
>
|
|
{isMobileMenuOpen ? (
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
|
|
) : (
|
|
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
|
|
)}
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
|
|
{/* Mobile Menu */}
|
|
{isMobileMenuOpen && (
|
|
<div className="md:hidden bg-white border-b border-gray-100">
|
|
<div className="container px-4 py-4 space-y-4">
|
|
<a
|
|
href="#features"
|
|
className="block text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors"
|
|
onClick={() => setIsMobileMenuOpen(false)}
|
|
>
|
|
Features
|
|
</a>
|
|
<a
|
|
href="#benefits"
|
|
className="block text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors"
|
|
onClick={() => setIsMobileMenuOpen(false)}
|
|
>
|
|
Benefits
|
|
</a>
|
|
<a
|
|
href="#about"
|
|
className="block text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors"
|
|
onClick={() => setIsMobileMenuOpen(false)}
|
|
>
|
|
About
|
|
</a>
|
|
<a
|
|
href="#download"
|
|
className="block text-sm font-medium text-gray-600 hover:text-gray-900 transition-colors"
|
|
onClick={() => setIsMobileMenuOpen(false)}
|
|
>
|
|
Download
|
|
</a>
|
|
<Button className="w-full bg-blue-600 text-white hover:bg-blue-700">
|
|
Get Started
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
)}
|
|
</header>
|
|
);
|
|
} |