feat(components/system): implement Popup
This commit is contained in:
parent
7d5b2cbc89
commit
508e999a0c
19
src/components/system/Popup/Popup.tsx
Normal file
19
src/components/system/Popup/Popup.tsx
Normal 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>
|
||||
)
|
||||
}
|
1
src/components/system/Popup/index.ts
Normal file
1
src/components/system/Popup/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from './Popup'
|
Loading…
Reference in New Issue
Block a user