Replace checkboxes with SelectBox component on sex view

This commit is contained in:
Julia Friesel
2018-08-31 19:00:01 +02:00
parent f19a51d4ba
commit 5b6ac9ebc1
9 changed files with 158 additions and 149 deletions
+25
View File
@@ -0,0 +1,25 @@
import React, { Component } from 'react'
import {
View,
Text,
TouchableOpacity,
} from 'react-native'
import styles from '../../styles'
export default class SelectBox extends Component {
render () {
const style = [styles.selectBox]
const textStyle = []
if (this.props.value) {
style.push(styles.selectBoxActive)
textStyle.push(styles.selectBoxTextActive)
}
return (
<TouchableOpacity onPress={this.props.onPress}>
<View style={style}>
<Text style={textStyle}>{this.props.label}</Text>
</View>
</TouchableOpacity>
)
}
}