import { Modal, View, Text, StyleSheet, TouchableOpacity } from "react-native";
interface Props {
title: string;
onClose: () => void;
visible: boolean;
children: React.ReactNode;
}
export default function FormSheetModal(props: Props) {
const {
title,
onClose,
visible,
children
} = props;
return (
{title}
{children}
)
}
interface SectionProps {
title: string;
options: any;
children: React.ReactNode;
}
FormSheetModal.Section = (props: SectionProps) => {
const {
title,
options,
children
} = props;
return (
{title && {title}}
{options
? options.map((option, index) => (
{option.title}
))
: children}
)
}
const styles = StyleSheet.create({
modal: {
},
header: {
padding: 16,
alignItems: "center",
gap:16
},
handle: {
width: 60,
height: 4,
backgroundColor: "lightgray",
borderRadius: 2
},
title: {
fontSize: 18,
fontWeight: "bold"
},
section: {
paddingHorizontal: 16
},
sectionTitle: {
paddingHorizontal: 16,
paddingVertical: 8,
fontSize: 16,
fontWeight: "500",
color: "gray"
},
sectionGroup: {
backgroundColor: "white",
borderRadius: 12
},
sectionItem: {
height: 44,
justifyContent: "center",
paddingHorizontal: 16
},
sectionItemText: {
fontSize: 16
}
});