Skip to content

Commit 4985eb9

Browse files
committed
added css transition on hover
1 parent ddf1a5b commit 4985eb9

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

frontend/src/components/Sponsors/sponsorModal.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { sponsorInfo } from '../../../public/data/data';
2-
2+
import {motion} from 'framer-motion'
33
export default function SponsorModal(props: { sponsorInfo: sponsorInfo | null; setFalse: () => void }) {
44
if (props.sponsorInfo === null) {
55
return (
@@ -15,10 +15,14 @@ export default function SponsorModal(props: { sponsorInfo: sponsorInfo | null; s
1515
props.setFalse();
1616
}}
1717
>
18-
<div className="bg-[#3977f8] relative w-[800px] h-[550px] m-10 rounded-xl flex flex-col items-center justify-center">
19-
<a className="m-10 w-4/5 flex flex-col items-center justify-center" href={props.sponsorInfo.href}>
20-
<img className='w-4/5 max-w-[500px] max-h-[200px]' src={`./${props.sponsorInfo.svg}`} alt={props.sponsorInfo.alt} />
21-
</a>
18+
19+
<div className="bg-[#3977f8] relative w-[800px] h-[550px] mb-10 mx-10 rounded-xl flex flex-col items-center justify-center">
20+
<motion.a whileHover={{
21+
scale: 1.2,
22+
transition: { duration: 0.2 },
23+
}} className="w-4/5 m-10 flex flex-col items-center justify-center" href={props.sponsorInfo.href}>
24+
<img className='w-4/5 max-w-[400px] max-h-[250px]' src={`./${props.sponsorInfo.svg}`} alt={props.sponsorInfo.alt} />
25+
</motion.a >
2226
<h3 className="mx-10 py-10">{props.sponsorInfo.description}</h3>
2327
<button
2428
onClick={props.setFalse}

0 commit comments

Comments
 (0)