Skip to content

Commit 22e54f7

Browse files
committed
Animate modal
1 parent 6c8c104 commit 22e54f7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/components/HireMeModal.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1+
import { motion } from 'framer-motion';
12
import { FiX } from 'react-icons/fi';
23

34
const HireMeModal = ({ onClose, onRequest }) => {
45
return (
5-
<div className="fixed inset-0 z-30 transition-all duration-500">
6+
<motion.div
7+
initial={{ opacity: 0 }}
8+
animate={{ opacity: 1 }}
9+
exit={{ opacity: 0 }}
10+
className="fixed inset-0 z-30 transition-all duration-500"
11+
>
612
{/* Modal Background */}
713
<div className="bg-filter bg-black bg-opacity-50 fixed inset-0 w-full h-full z-20"></div>
814

@@ -119,7 +125,7 @@ const HireMeModal = ({ onClose, onRequest }) => {
119125
</div>
120126
</div>
121127
</main>
122-
</div>
128+
</motion.div>
123129
);
124130
};
125131

0 commit comments

Comments
 (0)