Add app text component and remove radio button dep

This commit is contained in:
Julia Friesel
2018-09-01 18:11:55 +02:00
parent ca8764aa4b
commit 8b37fa3ca4
17 changed files with 1626 additions and 1643 deletions
+13 -17
View File
@@ -1,6 +1,5 @@
import React, { Component } from 'react'
import {
Text,
TextInput,
View,
ScrollView
@@ -13,6 +12,7 @@ import {
} from '../labels/labels'
import ActionButtonFooter from './action-button-footer'
import SelectBox from '../select-box'
import { SymptomSectionHeader } from '../../app-text'
const sexBoxes = [{
label: activityLabels.solo,
@@ -79,22 +79,18 @@ export default class Sex extends Component {
return (
<View style={{ flex: 1 }}>
<ScrollView style={styles.page}>
<Text style={styles.symptomViewHeading}>Activity</Text>
<View style={styles.selectBoxSection}>
{this.makeSelectBoxes(sexBoxes)}
</View>
<Text style={styles.symptomViewHeading}>Contraceptives</Text>
<View style={styles.selectBoxSection}>
{this.makeSelectBoxes(contraceptiveBoxes)}
<SelectBox
value={this.state.other}
label={contraceptiveLabels.other}
onPress={() => {
this.toggleState('other')
this.setState({ focusTextArea: true })
}}
/>
</View>
<SymptomSectionHeader>Activity</SymptomSectionHeader>
{this.makeSelectBoxes(sexBoxes)}
<SymptomSectionHeader>Contraceptives</SymptomSectionHeader>
{this.makeSelectBoxes(contraceptiveBoxes)}
<SelectBox
value={this.state.other}
label={contraceptiveLabels.other}
onPress={() => {
this.toggleState('other')
this.setState({ focusTextArea: true })
}}
/>
{this.state.other &&
<TextInput
autoFocus={this.state.focusTextArea}