import React from 'react'; import { View, Text, StyleSheet } from 'react-native'; import DropdownSelectedItemsView from './DropdownSelectedItemsView'; import { colors } from '../../styles/colors'; import { typography } from '../../styles/typography'; const Dropdown = ({ testID, label, placeholder, helperText, error, getSelectedItemsLabel, openModal, closeModal, isMultiple, selectedItem, selectedItems, dropdownIcon, labelStyle, dropdownStyle, dropdownIconStyle, dropdownContainerStyle, selectedItemStyle, placeholderStyle, multipleSelectedItemStyle, dropdownErrorStyle, dropdownErrorTextStyle, dropdownHelperTextStyle, primaryColor, disabled, setIndexOfSelectedItem, }: any) => { return ( {label && label !== '' && ( {label} )} {error && error !== '' && ( {error} )} {helperText && helperText !== '' && !error && ( {helperText} )} ); }; const styles = StyleSheet.create({ label: { marginBottom: 16, color: colors.gray, ...typography.caption }, error: { color: colors.red, marginTop: 8, ...typography.caption }, helper: { marginTop: 8, color: colors.primary, ...typography.caption }, dropdownInputContainer: { marginBottom: 23, width: '100%' }, blackText: { color: colors.black }, }); export default Dropdown;