pantry-tracker / app / components / Layout / Header.tsx
Header.tsx
Raw
import React from 'react';

const Navbar = () => {
  return (
    <nav className="bg-white fixed w-full z-20 top-0 start-0  ">
      <div className="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4">
        <a href="/" className="flex items-center space-x-3 rtl:space-x-reverse">
          <img src="https://svgshare.com/i/18qR.svg" className="h-8" alt="pantry"/>
          <span className="self-center text-2xl whitespace-nowrap "></span>
        </a>
        <div className="flex md:order-2 space-x-3 md:space-x-0 rtl:space-x-reverse">
        <button type="button" className="hidden md:block text-white bg-[#63b2fc] hover:bg-[#3a9fff] focus:ring-4 focus:outline-none focus:ring-blue-400 font-medium rounded-lg text-sm px-4 py-2 text-center dark:bg-[#63b2fc] dark:hover:bg-[#3a9fff] dark:focus:bg-[#3a9fff]">Get started</button>
        <button data-collapse-toggle="navbar-sticky" type="button" className="inline-flex items-center p-2 w-10 h-10 justify-center text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600" aria-controls="navbar-sticky" aria-expanded="false">
            <span className="sr-only">Open main menu</span>
            <svg className="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 14">
              <path stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M1 1h15M1 7h15M1 13h15"/>
            </svg>
          </button>
        </div>
        <div className="items-center justify-between hidden w-full md:flex md:w-auto md:order-1" id="navbar-sticky">
          <ul className="flex flex-col p-4 md:p-0 mt-4 font-medium rounded-lg bg-gray-50 md:space-x-8 rtl:space-x-reverse md:flex-row md:mt-0 md:border-0 md:bg- dark:bg-gray-800 md:dark:bg-transparent">
            <li>
            <a href="#" className="block py-2 px-3 text-[#8198ae] hover:text-[#63b2fc] rounded md:bg-transparent md:p-0" aria-current="page">Home</a>
            </li>
            <li>
            <a href="#" className="block py-2 px-3 text-[#8198ae] hover:text-[#63b2fc] rounded md:bg-transparent md:p-0">About</a>
            </li>
            <li>
            <a href="#" className="block py-2 px-3 text-[#8198ae] hover:text-[#63b2fc] rounded md:bg-transparent md:p-0">Services</a>
            </li>
          </ul>
        </div>
      </div>
    </nav>
  );
};

export default Navbar;