diff --git a/components/cycle-day/select-box.js b/components/cycle-day/select-box.js index 4fcdd2934726f989266e6e3d474fba237a11de5e..62daeceb3a182fef206d6d362dfbe6128322215a 100644 --- a/components/cycle-day/select-box.js +++ b/components/cycle-day/select-box.js @@ -17,7 +17,7 @@ export default class SelectBox extends Component { return ( <TouchableOpacity onPress={this.props.onPress}> <View style={style}> - <AppText style={textStyle}>{this.props.label}</AppText> + <AppText style={textStyle}>{this.props.children}</AppText> </View> </TouchableOpacity> ) diff --git a/components/cycle-day/symptoms/sex.js b/components/cycle-day/symptoms/sex.js index ddb183108416515c23dc68b0cb61ca34e332779b..248ef40731556ea708750af136b4c8b9e518d469 100644 --- a/components/cycle-day/symptoms/sex.js +++ b/components/cycle-day/symptoms/sex.js @@ -63,9 +63,10 @@ export default class Sex extends Component { <SelectBox value={this.state[stateKey]} onPress={() => this.toggleState(stateKey)} - label={label} key={stateKey} - /> + > + {label} + </SelectBox> ) }) } @@ -85,12 +86,14 @@ export default class Sex extends Component { {this.makeSelectBoxes(contraceptiveBoxes)} <SelectBox value={this.state.other} - label={contraceptiveLabels.other} onPress={() => { this.toggleState('other') this.setState({ focusTextArea: true }) }} - /> + > + {contraceptiveLabels.other} + </SelectBox> + {this.state.other && <TextInput autoFocus={this.state.focusTextArea}