improved mobile nav animation

This commit is contained in:
liyunze 2025-08-10 13:28:22 +10:00
parent 0f8be5208a
commit e4887cec25

View file

@ -185,6 +185,7 @@ export const HoverNavigation = ({
<motion.ul <motion.ul
animate={{ animate={{
height: hamburgerOpen ? "auto" : "0px", height: hamburgerOpen ? "auto" : "0px",
opacity: hamburgerOpen ? "100%" : "0",
}} }}
transition={{ transition={{
ease: "easeInOut", ease: "easeInOut",
@ -195,9 +196,7 @@ export const HoverNavigation = ({
<a <a
href={item?.link} href={item?.link}
key={item?.link} key={item?.link}
className="group relative block h-full px-5 py-2 text-center lg:hidden" className="group relative block px-5 py-2 text-center lg:hidden"
onMouseEnter={() => setHoveredIndex(idx)}
onMouseLeave={() => setHoveredIndex(null)}
> >
{item.label} {item.label}
</a> </a>