diff --git a/src/components/modal/modal.tsx b/src/components/modal/modal.tsx index 5e26b3a..c8b2824 100644 --- a/src/components/modal/modal.tsx +++ b/src/components/modal/modal.tsx @@ -1,6 +1,8 @@ -import { AnimatePresence } from 'framer-motion'; +import { AnimatePresence, motion } from 'framer-motion'; import { IoClose } from 'react-icons/io5/index'; +import { fade, mix, slideY } from '@/lib/motion'; + import styles from './modal.module.css'; interface ModalProps { @@ -10,23 +12,38 @@ interface ModalProps { } export function Modal({ children, onClose, show }: ModalProps) { + const variants = { + modal: mix(fade(), slideY(20)), + overlay: fade(), + }; + return ( {show && ( <> -
-
+ {children} -
+
)}