diff --git a/components/app-text.js b/components/app-text.js index eabab32..6e996da 100644 --- a/components/app-text.js +++ b/components/app-text.js @@ -1,33 +1,30 @@ -import React, { Component } from 'react' +import React from 'react' import { Text } from 'react-native' import styles from "../styles" -export default class AppText extends Component { - render() { - return ( - - {this.props.children} - - ) - } +export default function AppText(props) { + return ( + + {props.children} + + ) } -export class AppTextLight extends Component { - render() { - return ( - - {this.props.children} - - ) - } +export function AppTextLight(props) { + return ( + + {props.children} + + ) } -export class SymptomSectionHeader extends Component { - render() { - return ( - - {this.props.children} - - ) - } +export function SymptomSectionHeader(props) { + return ( + + {props.children} + + ) } \ No newline at end of file diff --git a/components/link.js b/components/link.js new file mode 100644 index 0000000..f5d2c10 --- /dev/null +++ b/components/link.js @@ -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 ( + Linking.openURL(props.href)} + >{props.text} + ) +} \ No newline at end of file diff --git a/components/settings/nfp-settings/index.js b/components/settings/nfp-settings/index.js index a83405e..e975dc7 100644 --- a/components/settings/nfp-settings/index.js +++ b/components/settings/nfp-settings/index.js @@ -8,6 +8,7 @@ import AppText from '../../app-text' import TempSlider from './temp-slider' import UseCervixSetting from './use-cervix' import Icon from 'react-native-vector-icons/Entypo' +import Link from '../../link' export default class Settings extends Component { constructor(props) { @@ -31,7 +32,11 @@ export default class Settings extends Component { {`${labels.preOvu.title} `} - {`${labels.preOvu.note} `} + + {labels.preOvu.note1} + + {labels.preOvu.note2} + ) diff --git a/i18n/en/settings.js b/i18n/en/settings.js index a37ca75..b703703 100644 --- a/i18n/en/settings.js +++ b/i18n/en/settings.js @@ -1,3 +1,4 @@ + export default { menuTitles: { reminders: 'Reminders', @@ -81,6 +82,8 @@ export default { }, preOvu: { 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." } } \ No newline at end of file diff --git a/styles/index.js b/styles/index.js index f4558e4..1c6cf62 100644 --- a/styles/index.js +++ b/styles/index.js @@ -40,6 +40,10 @@ export default StyleSheet.create({ emphasis: { fontWeight: 'bold', }, + link: { + color: cycleDayColor, + textDecorationLine: 'underline' + }, title: { fontSize: 18, color: 'black',