diff --git a/components/sections/navigation/DropdownMenu.tsx b/components/sections/navigation/DropdownMenu.tsx index e8368e330..7003d3787 100644 --- a/components/sections/navigation/DropdownMenu.tsx +++ b/components/sections/navigation/DropdownMenu.tsx @@ -1,64 +1,70 @@ -import { Fragment } from 'react' -import Image from 'next/image' -import { Menu, Transition } from '@headlessui/react' -import Link from 'next/link' +import { Fragment } from 'react'; +import Image from 'next/image'; +import { Menu, Transition } from '@headlessui/react'; +import Link from 'next/link'; -import SocialLinks from '../../common/SocialLinks' -import MobileMenu from '../../../public/mobile_menu.svg' +import SocialLinks from '../../common/SocialLinks'; +import MobileMenu from '../../../public/mobile_menu.svg'; +import MobileCloseMenu from '../../../public/close_btn.svg'; interface MenuItem { - label: string - href: string + label: string; + href: string; } interface DropdownMenuProps { - menuItems: MenuItem[] - className?: string - label: string + menuItems: MenuItem[]; + className?: string; + label: string; } const DropdownMenu = ({ menuItems, className, label }: DropdownMenuProps) => { return ( - -
- - Menu - -
- - -

- MENU -

-
- {menuItems.map(({ label, href }) => ( - - - - {label} - - - - ))} -
-
-

- SOCIALS -

- -
-
-
+ + {({ open }) => ( + <> + + + Menu + + + + +

+ MENU +

+
+ {menuItems.map(({ label, href }) => ( + + + + {label} + + + + ))} +
+
+

+ SOCIALS +

+ +
+
+
+ + )}
- ) -} + ); +}; -export default DropdownMenu +export default DropdownMenu; diff --git a/public/close_btn.svg b/public/close_btn.svg new file mode 100644 index 000000000..a7b2ce574 --- /dev/null +++ b/public/close_btn.svg @@ -0,0 +1,3 @@ + + +