From 1d0b2497b442071056f0792b1c8320e314e9a660 Mon Sep 17 00:00:00 2001
From: Julia Friesel <julia.friesel@gmail.com>
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 4fcdd293..62daeceb 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 ddb18310..248ef407 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}
-- 
GitLab