JuanPabloDiaz / landingZone

Landing page from a Figma project. App Build with React and Tailwind
https://lp.jpdiaz.dev/
MIT License
1 stars 0 forks source link

MVP2 >> El menú debe cambiar al hacer scroll en Mobile #54

Closed JuanPabloDiaz closed 9 months ago

JuanPabloDiaz commented 9 months ago
  1. Use la className utility function classNamesNavBarScroll:
function classNamesNavBarScroll(...classes) {
  return classes.filter(Boolean).join(' ');
}
  1. Then edit the div class where the hamburguer icon is:
<div
className={classNamesNavBarScroll(
   scrollPosition > 0 ? "bg-[#132577]" : "bg-none",
  "flex lg:hidden fixed p-2 rounded-full transition-color duration-1000"
  )}
>