import React, { FC, ReactNode } from 'react';
import { Modal as ReactModal } from 'react-native';

type Props = {
  children: ReactNode;
  visible: boolean;
  onRequestClose?: () => void;
};

const Modal: FC<Props> = ({ children, onRequestClose, visible }) => {
  return (
    <ReactModal
      animationType={'slide'}
      statusBarTranslucent={true}
      presentationStyle={'pageSheet'}
      visible={visible}
      onRequestClose={onRequestClose}
    >
      {children}
    </ReactModal>
  );
};

export default Index;
