feat(components/system): implement Popup

This commit is contained in:
Walid 2023-04-23 20:13:36 +01:00
parent 7d5b2cbc89
commit 508e999a0c
Signed by: Walidoux
GPG Key ID: CCF21881FE8BEBAF
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import { AnimateView } from '../AnimateView'
interface PopupProps {
condition: boolean
children: React.ReactNode
}
export const Popup: React.FC<PopupProps> = ({ condition, children }) => {
return (
<AnimateView
className='absolute z-20 top-0 left-0 w-screen h-screen bg-black/50 backdrop-blur-xl'
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
condition={condition}>
{children}
</AnimateView>
)
}

View File

@ -0,0 +1 @@
export * from './Popup'