import { useState, useEffect } from 'react' export const ModalWrapper = ({ app, children = null, flex = 'row', justify = 'center', items = 'center', bg = 'base-100 lg:bg-base-300', bgOpacity = '100 lg:bg-opacity-95', bare = false, keepOpenOnClick = false, }) => { const [animate, setAnimate] = useState(true) useEffect(() => { if (animate) setAnimate(false) }, [children, animate]) return (
app.updateState('modal', false)} > {bare ? ( children ) : (
{children}
)}
) }