Extract link component and parse all app text for links
This commit is contained in:
+10
-6
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user