Skip to content

Commit

Permalink
feat: Implement framer-motion for added interactivity (#45)
Browse files Browse the repository at this point in the history
* Implement framer-motion for added interactivity

* Fixed UI issue

* This should fix the error

---------

Co-authored-by: Diogo Moreira <93798407+diogosupermufasa@users.noreply.github.com>
Co-authored-by: Priyanshu Maurya <priyanshu1999pm@gmail.com>
  • Loading branch information
3 people committed Aug 18, 2023
1 parent 87c1ab3 commit aa4f862
Show file tree
Hide file tree
Showing 3 changed files with 839 additions and 3 deletions.
25 changes: 22 additions & 3 deletions components/NavigationLinks.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
import Link from "next/link"
'use client'
import Link from "next/link";
import { motion } from "framer-motion";
import useMediaQuery from '@mui/material/useMediaQuery';




export default function NavigationLinks() {

const isMobile = useMediaQuery("(max-width: 600px)");

const linkVariant = {
hover: {
scale: isMobile ? 1.1 : 1.02,
transition: {
duration: 0.3,
yoyo: Infinity
}
}
}

return (
<div className='flex text-[--dark-bg] bg-[--light-bg] dark:bg-[--dark-bg] dark:text-[--light-bg] flex-col items-center justify-between '>
<motion.div className='flex text-[--dark-bg] bg-[--light-bg] dark:bg-[--dark-bg] dark:text-[--light-bg] flex-col items-center justify-between ' whileHover='hover' variants={linkVariant}>
<div className="w-50 border border-[--dark-bg] dark:border-[--light-bg] rounded-3xl flex flex-row justify-evenly items-center">
<Link className="w-24 text-center font-semibold hover:bg-[color:var(--primary-color)] hover:text-[--dark-bg] focus:bg-[--primary-color] rounded-l-3xl transition px-4 py-2" href={"/tools"}>Tools</Link>
<Link className="w-24 text-center font-semibold hover:bg-[color:var(--primary-color)] hover:text-[--dark-bg] focus:bg-[--primary-color] transition px-4 py-2" href={"/prompts"}>Prompts</Link>
<Link className="w-24 text-center font-semibold hover:bg-[color:var(--primary-color)] hover:text-[--dark-bg] focus:bg-[--primary-color] rounded-r-3xl transition px-4 py-2" href={"/datasets"}>Datasets</Link>
</div>
</div>
</motion.div>
)
}
Loading

1 comment on commit aa4f862

@vercel
Copy link

@vercel vercel bot commented on aa4f862 Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

aifusion – ./

aifusion.vercel.app
aifusion-git-main-priyansu.vercel.app
aifusion-priyansu.vercel.app

Please sign in to comment.