11import { useState , useRef , useEffect } from "react" ;
22import { Bell , X , Info , AlertTriangle , Settings , LogOut } from "lucide-react" ;
33import type { Notification } from "../types" ;
4+ import { ThemeToggle } from "./ThemeToggle" ;
45
56interface HeaderProps {
67 pageTitle : string ;
@@ -52,8 +53,8 @@ export const Header: React.FC<HeaderProps> = ({
5253 } ;
5354
5455 return (
55- < header className = "h-16 border-b border-zinc-800 flex items-center justify-between px-8 bg-zinc-950/20 z-40" >
56- < h2 className = "font-geist text-lg font-bold text-white capitalize" >
56+ < header className = "h-16 border-b border-gray-200 dark:border- zinc-800 flex items-center justify-between px-8 bg-gray-50 dark: bg-zinc-950/20 z-40" >
57+ < h2 className = "font-geist text-lg font-bold text-gray-900 dark:text- white capitalize" >
5758 { pageTitle === "qpus"
5859 ? "QPU Registry"
5960 : pageTitle === "jobs"
@@ -66,7 +67,7 @@ export const Header: React.FC<HeaderProps> = ({
6667 < button
6768 aria-label = "Notifications"
6869 onClick = { ( ) => setDropdownOpen ( ! dropdownOpen ) }
69- className = "w-9 h-9 rounded-full bg-zinc-900 border border-zinc-800 hover:bg-zinc-800 text-zinc-400 hover:text-white transition-all flex items-center justify-center relative focus:outline-none"
70+ className = "w-9 h-9 rounded-full bg-white dark:bg- zinc-900 border border-gray-200 dark:border- zinc-800 hover:bg-gray-100 dark:bg- zinc-800 text-gray-500 dark:text- zinc-400 hover:text-gray-900 dark :text-white transition-all flex items-center justify-center relative focus:outline-none"
7071 >
7172 < Bell className = "w-5 h-5" />
7273 { notifications . length > 0 && (
@@ -78,9 +79,9 @@ export const Header: React.FC<HeaderProps> = ({
7879
7980 { /* Dropdown panel */ }
8081 { dropdownOpen && (
81- < div className = "absolute right-0 mt-2 w-80 bg-zinc-900 border border-zinc-800 rounded-lg shadow-2xl p-4 space-y-3 z-[100]" >
82- < div className = "flex justify-between items-center border-b border-zinc-800 pb-2" >
83- < span className = "text-xs font-semibold text-white uppercase tracking-wider" >
82+ < div className = "absolute right-0 mt-2 w-80 bg-white dark:bg- zinc-900 border border-gray-200 dark: border-zinc-800 rounded-lg shadow-2xl p-4 space-y-3 z-[100]" >
83+ < div className = "flex justify-between items-center border-b border-gray-200 dark:border- zinc-800 pb-2" >
84+ < span className = "text-xs font-semibold text-gray-900 dark:text- white uppercase tracking-wider" >
8485 Announcements
8586 </ span >
8687 { notifications . length > 0 && (
@@ -89,15 +90,15 @@ export const Header: React.FC<HeaderProps> = ({
8990 onDismissAllNotifications ( ) ;
9091 setDropdownOpen ( false ) ;
9192 } }
92- className = "text-[10px] text-zinc-500 hover:text-white transition-colors focus:outline-none"
93+ className = "text-[10px] text-gray-400 dark:text- zinc-500 hover:text-gray-900 dark :text-white transition-colors focus:outline-none"
9394 >
9495 Clear All
9596 </ button >
9697 ) }
9798 </ div >
9899 < div className = "max-h-60 overflow-y-auto space-y-2 text-xs" >
99100 { notifications . length === 0 ? (
100- < div className = "text-zinc-500 text-center py-4" >
101+ < div className = "text-gray-400 dark:text- zinc-500 text-center py-4" >
101102 No new notifications
102103 </ div >
103104 ) : (
@@ -111,27 +112,27 @@ export const Header: React.FC<HeaderProps> = ({
111112 className = { `border p-3 rounded flex justify-between items-start gap-4 transition-colors relative group ${
112113 isFail
113114 ? "bg-red-500/10 border-red-500/20 text-red-200"
114- : "bg-zinc-900 border-zinc-800 text-zinc-300"
115+ : "bg-white dark:bg- zinc-900 border-gray-200 dark:border- zinc-800 text-gray-600 dark: text-zinc-300"
115116 } `}
116117 >
117118 < div className = "flex items-start gap-2.5" >
118119 { isFail ? (
119120 < AlertTriangle className = "w-4 h-4 text-red-400 mt-0.5" />
120121 ) : (
121- < Info className = "w-4 h-4 text-zinc-400 mt-0.5" />
122+ < Info className = "w-4 h-4 text-gray-500 dark:text- zinc-400 mt-0.5" />
122123 ) }
123124 < div >
124- < p className = "font-semibold text-xs text-white" >
125+ < p className = "font-semibold text-xs text-gray-900 dark:text- white" >
125126 { ann . title }
126127 </ p >
127- < p className = "text-[10px] text-zinc-400 mt-1" >
128+ < p className = "text-[10px] text-gray-500 dark:text- zinc-400 mt-1" >
128129 { ann . description }
129130 </ p >
130131 </ div >
131132 </ div >
132133 < button
133134 onClick = { ( ) => onDismissNotification ( ann . id ) }
134- className = "text-zinc-500 hover:text-white transition-colors focus:outline-none"
135+ className = "text-gray-400 dark:text- zinc-500 hover:text-gray-900 dark :text-white transition-colors focus:outline-none"
135136 >
136137 < X className = "w-3.5 h-3.5" />
137138 </ button >
@@ -144,25 +145,28 @@ export const Header: React.FC<HeaderProps> = ({
144145 ) }
145146 </ div >
146147
148+ { /* Theme Toggle */ }
149+ < ThemeToggle />
150+
147151 { /* User menu */ }
148152 < div className = "relative flex items-center gap-3" ref = { profileDropdownRef } >
149- < span className = "text-xs text-zinc-400 font-medium" > { userEmail } </ span >
153+ < span className = "text-xs text-gray-500 dark:text- zinc-400 font-medium" > { userEmail } </ span >
150154 < button
151155 data-testid = "user-avatar"
152156 onClick = { ( ) => setProfileDropdownOpen ( ! profileDropdownOpen ) }
153- className = "w-8 h-8 rounded-full bg-zinc-800 border border-zinc-700 flex items-center justify-center text-white font-semibold uppercase text-xs hover:border-zinc-500 transition-colors focus:outline-none"
157+ className = "w-8 h-8 rounded-full bg-gray-100 dark:bg- zinc-800 border border-gray-300 dark:border- zinc-700 flex items-center justify-center text-gray-900 dark:text- white font-semibold uppercase text-xs hover:border-gray-400 dark: hover:border-zinc-500 transition-colors focus:outline-none"
154158 >
155159 { getInitials ( userEmail ) }
156160 </ button >
157161
158162 { profileDropdownOpen && (
159- < div className = "absolute right-0 top-12 mt-2 w-48 bg-zinc-900 border border-zinc-800 rounded-lg shadow-2xl p-2 space-y-1 z-[100]" >
163+ < div className = "absolute right-0 top-12 mt-2 w-48 bg-white dark:bg- zinc-900 border border-gray-200 dark: border-zinc-800 rounded-lg shadow-2xl p-2 space-y-1 z-[100]" >
160164 < button
161165 onClick = { ( ) => {
162166 setProfileDropdownOpen ( false ) ;
163167 onGoToSettings ( ) ;
164168 } }
165- className = "w-full flex items-center gap-2 px-3 py-2 text-sm text-zinc-300 hover:text-white hover:bg-zinc-800 rounded transition-colors focus:outline-none"
169+ className = "w-full flex items-center gap-2 px-3 py-2 text-sm text-gray-600 dark:text- zinc-300 hover:text-gray-900 dark:text- white hover:bg-gray-100 dark :bg-zinc-800 rounded transition-colors focus:outline-none"
166170 >
167171 < Settings className = "w-4 h-4" />
168172 Settings
0 commit comments