ba-cafe

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

Header.tsx (981B)


      1 "use client";
      2 
      3 import ThemeToggleButton from './ThemeToggleButton';
      4 
      5 interface HeaderProps {
      6   onMenuClick?: () => void;
      7   isLoggedIn?: boolean;
      8 }
      9 
     10 export default function Header({ onMenuClick, isLoggedIn = false }: HeaderProps) {
     11   return (
     12     <header className="fixed top-0 left-0 right-0 z-20 flex items-center h-16 justify-between px-6 shadow-sm border-b">
     13       <h1>Cafe Timer</h1>
     14       <div className="flex items-center gap-4">
     15         <ThemeToggleButton />
     16         {isLoggedIn && (
     17           <button 
     18             onClick={onMenuClick}
     19             className="p-2 rounded-full cursor-pointer"
     20             aria-label="メニューを開く"
     21           >
     22             <svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
     23               <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 6h16M4 12h16M4 18h16" />
     24             </svg>
     25           </button>
     26         )}
     27       </div>
     28     </header>
     29   );
     30 }