| 35 | }; |
| 36 | |
| 37 | export interface SelectProps { |
| 38 | /** Add label string */ |
| 39 | label?: string; |
| 40 | /** Add style to label*/ |
| 41 | labelClasses?: string; |
| 42 | /** Add style to touchableOpacity selector*/ |
| 43 | selectClasses?: string; |
| 44 | /** Add your options array -> send any type (example model: [{item:'',key:''}]) to converter to ISelectedOption > {label, value}*/ |
| 45 | options: any[]; |
| 46 | /** Add your selected state changer*/ |
| 47 | onSelect: (value: string | number) => void; |
| 48 | /** Add your selected state value*/ |
| 49 | selectedValue?: string | number; |
| 50 | /** Add your selected placeholder -> default is 'Select an option' */ |
| 51 | placeholder?: string; |
| 52 | /** Define labelKey to options */ |
| 53 | labelKey: string; |
| 54 | /** Define valueKey to options */ |
| 55 | valueKey: string; |
| 56 | } |
| 57 | |
| 58 | /** Customizable Select Component :) options receive any data type and converter into label and value to render */ |
| 59 | export const Select = ({ |
nothing calls this directly
no outgoing calls
no test coverage detected