Skip to content

Commit

Permalink
feat: mobile nav animation
Browse files Browse the repository at this point in the history
  • Loading branch information
zaida04 committed Jan 24, 2024
1 parent 5e9d537 commit 10e8e47
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@types/react": "^18.2.48",
"@types/react-dom": "^18.2.18",
"tailwindcss": "^3.4.1",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.3.3"
}
}
4 changes: 2 additions & 2 deletions src/components/nav/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function NavbarLinks() {
{navbarLabels.map(key => {
const destination = navbar[key as keyof typeof navbar];

return <div>
return <div key={key}>
<a className="text-base" href={destination}>{key}</a>
</div>
})}
Expand All @@ -40,7 +40,7 @@ export default function Navbar() {
<Menu onClick={() => setShow(!show)} size={40} />
</div>

{show && <div className="flex flex-col w-full gap-4">
{show && <div className="flex flex-col w-full gap-4 animate-in slide-in-from-top duration-500 ">
<NavbarLinks />
</div>}
</div>
Expand Down
5 changes: 4 additions & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ export default ({
},
},
},
plugins: [],
plugins: [
// @ts-ignore
require("tailwindcss-animate")
],
} satisfies Config);

0 comments on commit 10e8e47

Please sign in to comment.