import React from "react"; import { FiAlignJustify } from "react-icons/fi"; import { Link } from "react-router-dom"; import { BsArrowBarUp } from "react-icons/bs"; import { FiSearch } from "react-icons/fi"; import { RiMoonFill, RiSunFill } from "react-icons/ri"; import { IoMdNotificationsOutline, IoMdInformationCircleOutline, } from "react-icons/io"; const Navbar = (props) => { const { onOpenSidenav, brandText } = props; const [darkmode, setDarkmode] = React.useState(false); return ( <nav className="sticky top-4 z-40 flex flex-row flex-wrap items-center justify-between rounded-xl bg-white/10 p-2 backdrop-blur-xl dark:bg-[#0b14374d]"> <div className="ml-[6px]"> <div className="h-6 w-[224px] pt-1"> <a className="text-sm font-normal text-navy-700 hover:underline dark:text-white dark:hover:text-white" href=" " > Pages <span className="mx-1 text-sm text-navy-700 hover:text-navy-700 dark:text-white"> / </span> </a> <Link className="text-sm font-normal capitalize text-navy-700 hover:underline dark:text-white dark:hover:text-white" to="#" > Main Dashboard </Link> </div> <p className="shrink text-[33px] capitalize text-navy-700 dark:text-white"> <Link to="#" className="font-bold capitalize hover:text-navy-700 dark:hover:text-white" > Main Dashboard </Link> </p> </div> <div className="relative mt-[3px] flex h-[61px] w-[355px] flex-grow items-center justify-around gap-2 rounded-full bg-white px-2 py-2 shadow-xl shadow-shadow-500 dark:!bg-navy-800 dark:shadow-none md:w-[365px] md:flex-grow-0 md:gap-1 xl:w-[365px] xl:gap-2"> <div className="flex h-full items-center rounded-full bg-lightPrimary text-navy-700 dark:bg-navy-900 dark:text-white xl:w-[225px]"> <p className="pl-3 pr-2 text-xl"> <FiSearch className="h-4 w-4 text-gray-400 dark:text-white" /> </p> <input type="text" placeholder="Search..." class="block h-full w-full rounded-full bg-lightPrimary text-sm font-medium text-navy-700 outline-none placeholder:!text-gray-400 dark:bg-navy-900 dark:text-white dark:placeholder:!text-white sm:w-fit" /> </div> <span className="flex cursor-pointer text-xl text-gray-600 dark:text-white xl:hidden" > <FiAlignJustify className="h-5 w-5" /> </span> <p className="cursor-pointer"> <IoMdInformationCircleOutline className="h-4 w-4 text-gray-600 dark:text-white" /> </p> <div className="cursor-pointer text-gray-600" onClick={() => { if (darkmode) { document.body.classList.remove("dark"); setDarkmode(false); } else { document.body.classList.add("dark"); setDarkmode(true); } }} > {darkmode ? ( <RiSunFill className="h-4 w-4 text-gray-600 dark:text-white" /> ) : ( <RiMoonFill className="h-4 w-4 text-gray-600 dark:text-white" /> )} </div> <img className="h-10 w-10 rounded-full" src="https://raw.githubusercontent.com/horizon-ui/horizon-tailwind-react/main/src/assets/img/avatars/avatar4.png" alt="Elon Musk" /> </div> </nav> ); }; export default Navbar;