"use client"; import { FC, ReactNode, useState } from "react"; import * as Dialog from "@radix-ui/react-dialog"; import { MdClose } from "react-icons/md"; import { AnimatePresence, motion } from "framer-motion"; import Button from "./Button"; interface ModalProps { title: string; desc: string; children?: ReactNode; Trigger: ReactNode; CloseTrigger?: ReactNode; } const Modal: FC = ({ title, desc, children, Trigger, CloseTrigger, }) => { const [open, setOpen] = useState(false); return ( {Trigger} {/* */} {open ? ( {title} {desc} {children} {CloseTrigger ? ( CloseTrigger ) : ( )} ) : null} ); }; export default Modal;