From 1d0b2497b442071056f0792b1c8320e314e9a660 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Sat, 1 Sep 2018 18:28:05 +0200 Subject: [PATCH] Make select box text a child not a prop --- components/cycle-day/select-box.js | 2 +- components/cycle-day/symptoms/sex.js | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/components/cycle-day/select-box.js b/components/cycle-day/select-box.js index 4fcdd29..62daece 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 ( - {this.props.label} + {this.props.children} ) diff --git a/components/cycle-day/symptoms/sex.js b/components/cycle-day/symptoms/sex.js index ddb1831..248ef40 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 { this.toggleState(stateKey)} - label={label} key={stateKey} - /> + > + {label} + ) }) } @@ -85,12 +86,14 @@ export default class Sex extends Component { {this.makeSelectBoxes(contraceptiveBoxes)} { this.toggleState('other') this.setState({ focusTextArea: true }) }} - /> + > + {contraceptiveLabels.other} + + {this.state.other &&