import { navLinks } from "@/constant/Constant"; import Link from "next/link"; import React, { useContext } from "react"; import { CgClose } from "react-icons/cg"; import { ThemeContext } from "@/components/provider/ThemeProvider"; import { themeColors } from "@/components/Helper/ThemeColors"; type Props = { showNav: boolean; closeNav: () => void; }; const MobileNav = ({ closeNav, showNav }: Props) => { const navOpen = showNav ? "translate-y-0 opacity-100" : "-translate-y-20 opacity-0 pointer-events-none"; const { theme, toggleTheme } = useContext(ThemeContext); const colors = themeColors[theme]; const cleanDarkBackground = theme === "dark" ? "#2A2A2A" : colors.primaryBg; return (
{/* overlay background */}
{/* nav menu */}
{/* Close icon */} {navLinks.map((link) => (

{link.label}

))} {/* Theme toggle button */}
); }; export default MobileNav;