import React from 'react'; import { Modal, View, Text, Pressable, StyleSheet, } from 'react-native'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; import {useTheme} from '../theme'; export interface FloatingModalProps { visible: boolean; onClose: () => void; title?: string; children: React.ReactNode; } export const FloatingModal: React.FC = ({ visible, onClose, title, children, }) => { const theme = useTheme(); const {colors, typography, spacing, shape, elevation} = theme; return ( {(title || onClose) && ( {title ?? ''} )} {children} ); }; const styles = StyleSheet.create({ backdrop: { flex: 1, justifyContent: 'center', }, card: { maxHeight: '72%', borderWidth: 1, overflow: 'hidden', }, header: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', borderBottomWidth: 1, }, });