({ theme, toggleTheme })
| 9 | } |
| 10 | |
| 11 | const Header: React.FC<HeaderProps> = ({ theme, toggleTheme }) => { |
| 12 | return ( |
| 13 | <header className="w-full border-b border-gray-200 dark:border-gray-700 bg-white/50 dark:bg-gray-800/50 backdrop-blur-sm fixed top-0 left-0 z-50"> |
| 14 | <div className="max-w-5xl mx-auto px-4 py-4 flex items-center justify-between"> |
| 15 | <Link to="/" className="flex items-center gap-3"> |
| 16 | <div className="w-12 h-12 rounded-lg bg-blue-500/10 dark:bg-blue-400/10 flex items-center justify-center"> |
| 17 | <img src={tinyWebPLogo} alt='TinyWebP Logo' className='w-10 h-10'/> |
| 18 | </div> |
| 19 | <span className="text-xl font-semibold text-gray-900 dark:text-white"> |
| 20 | TinyWebP |
| 21 | </span> |
| 22 | </Link> |
| 23 | <button |
| 24 | onClick={toggleTheme} |
| 25 | className="p-2 rounded-lg bg-gray-100 dark:bg-gray-700 text-gray-600 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 transition-colors" |
| 26 | aria-label="Toggle theme" |
| 27 | > |
| 28 | {theme === 'light' ? <Moon className="w-6 h-6" /> : <Sun className="w-6 h-6" />} |
| 29 | </button> |
| 30 | </div> |
| 31 | </header> |
| 32 | ); |
| 33 | }; |
| 34 | |
| 35 | export default Header; |
nothing calls this directly
no outgoing calls
no test coverage detected