()
| 47 | } |
| 48 | |
| 49 | renderSelectedOption() { |
| 50 | const { iconName, showSelectedOption, style, titleProperty } = this.props; |
| 51 | |
| 52 | const selectedOption = this.getSelectedOption(); |
| 53 | return selectedOption ? ( |
| 54 | <View style={style.horizontalContainer}> |
| 55 | <Button onPress={this.collapse} style={style.selectedOption}> |
| 56 | {showSelectedOption && <Text>{selectedOption[titleProperty]}</Text>} |
| 57 | <Icon name={iconName} style={style.icon} /> |
| 58 | </Button> |
| 59 | </View> |
| 60 | ) : null; |
| 61 | } |
| 62 | |
| 63 | render() { |
| 64 | const { collapsed } = this.state; |
no test coverage detected