-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLuxeNavbar.jsx
More file actions
77 lines (70 loc) · 2.44 KB
/
LuxeNavbar.jsx
File metadata and controls
77 lines (70 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import React, { useState, useEffect } from 'react';
import { Link } from 'react-router-dom';
import { ListIcon, MagnifyingGlassIcon } from '@phosphor-icons/react';
const LuxeNavbar = ({
toggleSidebar,
isSidebarOpen,
isSearchVisible,
toggleSearch,
}) => {
const [isScrolled, setIsScrolled] = useState(false);
useEffect(() => {
const handleScroll = () => {
setIsScrolled(window.scrollY > 20);
};
window.addEventListener('scroll', handleScroll);
return () => {
window.removeEventListener('scroll', handleScroll);
};
}, []);
return (
<header
className={`sticky top-0 left-0 right-0 z-[60] transition-all duration-500 bg-[#FDFCFB]/80 backdrop-blur-md border-b ${
isScrolled
? 'py-4 border-[#1A1A1A]/5 shadow-sm'
: 'py-6 border-transparent'
}`}
>
{' '}
<div className="mx-auto max-w-[1800px] px-6 md:px-12 flex justify-between items-center text-[#1A1A1A]">
{/* Left: Sidebar Toggle & Brand */}
<div className="flex items-center gap-6">
<button
onClick={toggleSidebar}
className="text-[#1A1A1A]/60 hover:text-[#1A1A1A] transition-colors focus:outline-none"
aria-label="Toggle Sidebar"
>
<ListIcon size={24} weight="light" />
</button>
<Link to="/" className="flex items-center gap-2 group">
<span className="font-playfairDisplay text-xl font-normal tracking-tight text-[#1A1A1A]">
Fezcodex
</span>
</Link>
</div>
{/* Right: Actions */}
<div className="flex items-center gap-6">
<Link
to="/about/luxe"
className="hidden md:flex items-center gap-2 text-[#1A1A1A]/60 hover:text-[#1A1A1A] transition-colors"
>
<span className="font-outfit text-xs font-medium uppercase tracking-widest">
About
</span>
</Link>
<button
onClick={toggleSearch}
className="flex items-center gap-2 text-[#1A1A1A]/60 hover:text-[#1A1A1A] transition-colors"
aria-label="Toggle Search"
>
<MagnifyingGlassIcon size={20} weight="light" />
<span className="hidden md:inline font-outfit text-xs font-medium uppercase tracking-widest">
Search
</span>
</button>
</div>
</div>
</header>
);
};
export default LuxeNavbar;