This commit is contained in:
Julia Friesel
2018-12-20 15:45:13 +01:00
parent 77363511ad
commit 0aa8179570
5 changed files with 49 additions and 27 deletions
+22 -25
View File
@@ -1,33 +1,30 @@
import React, { Component } from 'react' import React from 'react'
import { Text } from 'react-native' import { Text } from 'react-native'
import styles from "../styles" import styles from "../styles"
export default class AppText extends Component { export default function AppText(props) {
render() { return (
return ( <Text
<Text style={[styles.appText, this.props.style]}> style={[styles.appText, props.style]}
{this.props.children} onPress={props.onPress}
</Text> >
) {props.children}
} </Text>
)
} }
export class AppTextLight extends Component { export function AppTextLight(props) {
render() { return (
return ( <Text style={[styles.appTextLight, props.style]}>
<Text style={[styles.appTextLight, this.props.style]}> {props.children}
{this.props.children} </Text>
</Text> )
)
}
} }
export class SymptomSectionHeader extends Component { export function SymptomSectionHeader(props) {
render() { return (
return ( <AppText style={styles.symptomViewHeading}>
<AppText style={styles.symptomViewHeading}> {props.children}
{this.props.children} </AppText>
</AppText> )
)
}
} }
+13
View File
@@ -0,0 +1,13 @@
import React from 'react'
import { Linking } from 'react-native'
import AppText from "./app-text"
import styles from '../styles';
export default function Link(props) {
return (
<AppText
style={styles.link}
onPress={() => Linking.openURL(props.href)}
>{props.text}</AppText>
)
}
+6 -1
View File
@@ -8,6 +8,7 @@ import AppText from '../../app-text'
import TempSlider from './temp-slider' import TempSlider from './temp-slider'
import UseCervixSetting from './use-cervix' import UseCervixSetting from './use-cervix'
import Icon from 'react-native-vector-icons/Entypo' import Icon from 'react-native-vector-icons/Entypo'
import Link from '../../link'
export default class Settings extends Component { export default class Settings extends Component {
constructor(props) { constructor(props) {
@@ -31,7 +32,11 @@ export default class Settings extends Component {
<Icon name="info-with-circle" style={iconStyles.infoInHeading}/> <Icon name="info-with-circle" style={iconStyles.infoInHeading}/>
<AppText style={styles.settingsSegmentTitle}>{`${labels.preOvu.title} `}</AppText> <AppText style={styles.settingsSegmentTitle}>{`${labels.preOvu.title} `}</AppText>
</View> </View>
<AppText>{`${labels.preOvu.note} `}</AppText> <AppText>
{labels.preOvu.note1}
<Link text={labels.preOvu.link} href="https://gitlab.com/bloodyhealth/drip/wikis/home" />
{labels.preOvu.note2}
</AppText>
</View> </View>
</ScrollView> </ScrollView>
) )
+4 -1
View File
@@ -1,3 +1,4 @@
export default { export default {
menuTitles: { menuTitles: {
reminders: 'Reminders', reminders: 'Reminders',
@@ -81,6 +82,8 @@ export default {
}, },
preOvu: { preOvu: {
title: 'Infertile days at cycle start', title: 'Infertile days at cycle start',
note: "drip applies NFP's rules for calculating infertile days at the start of the cycle (see the wiki for more info). However, drip does not currently apply the so called 20-day-rule, which determines infertile days at the cycle start from past cycle lengths in case no past symptothermal info is available." note1: "drip applies NFP's rules for calculating infertile days at the start of the cycle (see the ",
link: 'wiki',
note2: " for more info). However, drip does not currently apply the so called 20-day-rule, which determines infertile days at the cycle start from past cycle lengths in case no past symptothermal info is available."
} }
} }
+4
View File
@@ -40,6 +40,10 @@ export default StyleSheet.create({
emphasis: { emphasis: {
fontWeight: 'bold', fontWeight: 'bold',
}, },
link: {
color: cycleDayColor,
textDecorationLine: 'underline'
},
title: { title: {
fontSize: 18, fontSize: 18,
color: 'black', color: 'black',