diff --git a/src/shared/MenuBar.tsx b/src/shared/MenuBar.tsx new file mode 100644 index 0000000..c12be0b --- /dev/null +++ b/src/shared/MenuBar.tsx @@ -0,0 +1,81 @@ +import React, { useState, Fragment, useEffect } from "react"; +import { Transition, Dialog } from "@headlessui/react"; +import NavMobile from "./Navigation/NavMobile"; +import { Bars3Icon } from "@heroicons/react/24/outline"; +import { usePathname } from "next/navigation"; + +export interface MenuBarProps { + className?: string; + iconClassName?: string; +} +const MenuBar: React.FC = ({ + className = "p-2.5 rounded-lg text-neutral-700 dark:text-neutral-300", + iconClassName = "h-8 w-8", +}) => { + const [isVisable, setIsVisable] = useState(false); + + const pathname = usePathname(); + + useEffect(() => { + setIsVisable(false); + }, [pathname]); + + const handleOpenMenu = () => setIsVisable(true); + const handleCloseMenu = () => setIsVisable(false); + + const renderContent = () => { + return ( + + + + + +
+
+ + + + + +
+
+
+
+ ); + }; + + return ( + <> + + + {renderContent()} + + ); +}; + +export default MenuBar;