Extract link component and parse all app text for links

This commit is contained in:
Julia Friesel
2019-02-02 11:55:03 +01:00
parent 87301da648
commit 0878654e82
8 changed files with 41 additions and 45 deletions
+10 -6
View File
@@ -1,15 +1,19 @@
import React from 'react'
import { Text } from 'react-native'
import styles from "../styles"
import Link from './link'
export default function AppText(props) {
// we parse for links in case the text contains any
return (
<Text
style={[styles.appText, props.style]}
onPress={props.onPress}
>
{props.children}
</Text>
<Link>
<Text
style={[styles.appText, props.style]}
onPress={props.onPress}
>
{props.children}
</Text>
</Link>
)
}