import React, { FC } from 'react'; import { AnimatePresence } from 'framer-motion'; import { ModalProps } from 'types'; import Portal from '../Portal'; import { Box, Button, Fade, Slide } from '../wrappers'; import { useComponentLogic } from './hooks'; import { closeButtonVariants, fadeVariants, overlayVariants } from './variants'; export const Modal: FC = props => { const { children, className, close, id, open, ...rest } = props; const { ref } = useComponentLogic(props); return ( {open && ( <> {children} )} ); }; Modal.defaultProps = { className: '', id: 'missing-id', shouldCloseOnClickOutside: false, }; export default Modal;