Package Exports
- rn-text-with-link
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rn-text-with-link) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rn-text-with-link
Create simple text component with hyperlink in React Native

Install
npm i rn-text-with-link
Example
Check App.js in the Example folder.
API
TextWithLink
text: string
Enter text through this.
urls could be represented by like this way. [label](url)
Example:
import TextWithLink from 'rn-text-with-link';
...
<TextWithLink
text={
'You acknowledge that you have read the [Privacy Policy](https://some_privacy_policy.com)'
}
/>
style?: StyleProp<TextStyle>
Style of normal text which not contains hyperlink
callback?: (url: string) => void
Callback function of onPressEvent of hyperlink.
linkStyle?: StyleProp<TextStyle>
The style of hyperlink text.
customCallbackTable?: Object
It could be useful when you want to bind a different callback function to a particular url, or when you want to bind your custom function.
Example:
import TextWithLink from 'rn-text-with-link';
...
const gotoSignUpScreen = () => {
props.navigation.navigate('SignUp');
};
...
<TextWithLink
text={"Don't have an account? [Sign up](!)"}
customCallbackTable={{
'Sign up': gotoSignUpScreen,
}}
/>
/>