import {Text, StyleSheet, Pressable} from "react-native"; import DropdownData from "../interfaces/DropdownData"; interface DropdownItemsProps { items: DropdownData[]; item: DropdownData; index: number; select: (item: DropdownData) => void; usePressable?: boolean; } export default function DropdownItem({items, item, index, select, usePressable}: DropdownItemsProps) { if (usePressable) return ( select(item)} > {item.value} ); return ( select(item)} > {item.value} ) } const style = StyleSheet.create({ container: { flexDirection: "row", flexGrow: 1, paddingVertical: 8, alignItems: "center", justifyContent: "space-between", borderBottomWidth: 1, borderBottomColor: "#E5E7EB", }, text: { flex: 1, fontWeight: "500", fontSize: 16, paddingHorizontal: 12, color: "#3F3F46", }, firstItem: { paddingBottom: 8, }, lastItem: { borderBottomWidth: 0, }, });