This commit is contained in:
Morten Olsen
2022-05-10 19:04:05 +02:00
parent 0b2f23ecb2
commit 8259232a83
101 changed files with 1752 additions and 1740 deletions

View File

@@ -0,0 +1,24 @@
import { ReactNode } from 'react';
import Wrapper from './react-modal';
import { Popup } from '../popup';
type ModalProps = {
visible: boolean;
onClose: () => void;
children: ReactNode;
}
const Modal: React.FC<ModalProps> = ({ visible, onClose, children }) => (
<Wrapper
transparent
visible={visible}
animationType="slide"
onRequestClose={onClose}
onDismiss={onClose}
>
<Popup onClose={onClose}>
{children}
</Popup>
</Wrapper>
);
export { Modal };