nav menu wave

This commit is contained in:
2026-03-01 22:06:17 -06:00
parent 375b7d7b47
commit 62346321d7
6 changed files with 155 additions and 0 deletions

30
src/nav/Menu.tsx Normal file
View File

@@ -0,0 +1,30 @@
import "./menu.scss";
import {motion, animate} from "framer-motion";
import {useEffect} from "react";
const articles = [
"Test 123",
"Hello",
"Title of Album"
];
const hidden = -999;
export function Menu({active} : {active: boolean}) {
useEffect(() => {
if(active) {
animate(".menu", {left : 0})
} else {
animate(".menu", {left : hidden})
}
}, [active]);
return (
<motion.section className="menu">
{
articles.map(title => <div>
{title}
</div>)
}
</motion.section>
)
}