You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

35 lines
966 B

import React from 'react';
import SelectDropdown from 'react-native-select-dropdown';
import Icon from 'react-native-vector-icons/Ionicons';
function Select({iconPosition,options,onChange, value}) {
return (
<SelectDropdown
data={options}
buttonStyle={{
width: '100%',
borderWidth: 1,
borderColor: 'grey',
borderRadius: 10,
}}
defaultButtonText="انتخاب کنید"
statusBarTranslucent={true}
buttonTextStyle={{
textAlign: 'center',
justifyContent: 'flex-end',
textAlign: 'right',
flex: 0,
// display: 'inline'
}}
dropdownIconPosition={iconPosition}
onSelect={(selectedItem, index) => {
console.log(selectedItem, index);
}}
renderDropdownIcon={() => (
<Icon name="chevron-down" size={25} color="grey" />
)}
/>
);
}
export default Select;