import React from 'react' import { Modal, TouchableWithoutFeedback, Dimensions, StyleSheet, View, Text } from 'react-native' import { useTheme } from 'styled-components/native' const deviceHeight = Dimensions.get('window').height interface Props { open: boolean; title?: string; children?: any; onClose?: any; } const OBottomPopup = (props: Props) => { const { open, title, onClose, children } = props const theme = useTheme(); const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#000000AA', justifyContent: 'flex-end', }, touchableOutsideStyle: { flex: 1, width: '100%' }, bottomContainer: { backgroundColor: theme.colors.white, width: '100%', borderTopRightRadius: 20, borderTopLeftRadius: 20, paddingHorizontal: 20, maxHeight: deviceHeight, }, titleStyle: { fontSize: 20, fontWeight: 'bold', marginVertical: 15 } }) return ( onClose()} > onClose()} > {title} {children} ) } export default OBottomPopup