import React from 'react'; import { View, FlatList, Text, StyleSheet, TouchableOpacity, } from 'react-native'; import { useColors } from '../../themes'; import { ColorType } from '../../common/types'; import { DropListProps, DropItem } from './types'; import Line from './Line'; const DropList = (props: DropListProps) => { const { items, active, onChange, itemStyle } = props; const Colors = useColors(); const styles = getStyles(Colors); const renderItem = ({ item, index }: { item: DropItem; index: number }) => { return ( onChange(index)}> {item?.label ?? item} {index < items.length - 1 && } ); }; return ( item?.label ?? item} persistentScrollbar /> ); }; const getStyles = (Colors: ColorType) => { return StyleSheet.create({ listContainer: { borderWidth: 1, borderColor: Colors.font_5, borderRadius: 6, height: 150, }, }); }; export default DropList;