00Boobs00 commited on
Commit
ff2b7ce
·
verified ·
1 Parent(s): 663837d

Upload components/Header.jsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/Header.jsx +89 -0
components/Header.jsx ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import React from 'react';
2
+ import { Bell, Search, Menu, User } from 'lucide-react';
3
+
4
+ export default function Header({ onMenuClick, onThemeToggle, isDark }) {
5
+ return (
6
+ <header className="bg-white dark:bg-dark-surface shadow-sm border-b border-gray-200 dark:border-dark-border z-10">
7
+ <div className="px-4 sm:px-6 lg:px-8">
8
+ <div className="flex justify-between items-center h-16">
9
+ {/* Left: Menu Button & Search */}
10
+ <div className="flex items-center">
11
+ <button
12
+ type="button"
13
+ className="lg:hidden -ml-2 inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-primary-500"
14
+ onClick={onMenuClick}
15
+ >
16
+ <span className="sr-only">Open sidebar</span>
17
+ <Menu className="h-6 w-6" />
18
+ </button>
19
+
20
+ <div className="hidden lg:block ml-4 lg:ml-0">
21
+ <div className="relative">
22
+ <div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
23
+ <Search className="h-5 w-5 text-gray-400" />
24
+ </div>
25
+ <input
26
+ className="block w-full pl-10 pr-3 py-2 border border-gray-300 rounded-md leading-5 bg-white placeholder-gray-500 focus:outline-none focus:placeholder-gray-400 focus:ring-1 focus:ring-primary-500 focus:border-primary-500 sm:text-sm dark:bg-dark-bg dark:border-gray-600 dark:text-white dark:placeholder-gray-400"
27
+ placeholder="Search projects, tasks, or team members..."
28
+ type="search"
29
+ />
30
+ </div>
31
+ </div>
32
+ </div>
33
+
34
+ {/* Right: Actions & Profile */}
35
+ <div className="flex items-center space-x-4">
36
+ {/* Anycoder Link */}
37
+ <a
38
+ href="https://huggingface.co/spaces/akhaliq/anycoder"
39
+ target="_blank"
40
+ rel="noopener noreferrer"
41
+ className="hidden md:inline-flex items-center px-3 py-1.5 border border-transparent text-xs font-medium rounded text-primary-700 bg-primary-100 hover:bg-primary-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 dark:bg-primary-900 dark:text-primary-300 dark:hover:bg-primary-800 transition-colors"
42
+ >
43
+ Built with anycoder
44
+ </a>
45
+
46
+ {/* Theme Toggle (Visual Placeholder as actual toggle is in Sidebar or can be here) */}
47
+ <button
48
+ onClick={onThemeToggle}
49
+ className="p-2 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary-500 dark:hover:text-gray-300 transition-colors"
50
+ >
51
+ {isDark ? (
52
+ <span className="sr-only">Enable light mode</span>
53
+ ) : (
54
+ <span className="sr-only">Enable dark mode</span>
55
+ )}
56
+ {/* Just a visual indicator that changes based on state, actual toggle handled here */}
57
+ <div className={`w-5 h-5 rounded-full ${isDark ? 'bg-yellow-400' : 'bg-gray-700'}`}></div>
58
+ </button>
59
+
60
+ {/* Notifications */}
61
+ <button className="p-2 rounded-full text-gray-400 hover:text-gray-500 focus:outline-none relative dark:hover:text-gray-300">
62
+ <span className="absolute top-1.5 right-1.5 block h-2 w-2 rounded-full bg-red-500 ring-2 ring-white dark:ring-dark-surface"></span>
63
+ <span className="sr-only">View notifications</span>
64
+ <Bell className="h-6 w-6" />
65
+ </button>
66
+
67
+ {/* Profile Dropdown */}
68
+ <div className="relative ml-3">
69
+ <div>
70
+ <button
71
+ type="button"
72
+ className="flex max-w-xs items-center rounded-full bg-white text-sm focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:bg-dark-surface"
73
+ id="user-menu-button"
74
+ >
75
+ <span className="sr-only">Open user menu</span>
76
+ <img
77
+ className="h-8 w-8 rounded-full object-cover"
78
+ src="https://picsum.photos/seed/user1/200/200"
79
+ alt=""
80
+ />
81
+ </button>
82
+ </div>
83
+ </div>
84
+ </div>
85
+ </div>
86
+ </div>
87
+ </header>
88
+ );
89
+ }