react-native-inapp-browser
A in-App browser for react native based apps using TransitApp/SVWebViewController.
Because there is some dependency problems, I cannot add TransitApp/SVWebViewController as a submodule.
Install
npm install react-native-inapp-browser
- Go to
node_modules
➜react-native-inapp-browser
➜RCTInAppBrowser
- Drag
RCTInAppBrowser
FOLDER into your master project - Run your project (
Cmd+R
)
Basic Usage
import Anchor from 'react-native-inapp-browser'; <Anchor ='http://google.com' ='e67221' >URL_PLACEHOLDER</Anchor>
Configurations
The <Anchor/>
object can take the following props:
Basic Parameters
href
: REQUIRED, the URL of the button.color
: The shortcut forcolor
attribute, will apply to the text-decoration style and font color.line
: Adding this will display a underline decoration.
NOTE: If you are using the style
props to style this button yourself, I suggest not using the color
and line
props.
Demo
import Anchor from 'react-native-inapp-browser'; Component { return <React.View => <Anchor ='http://google.com'>Open Googlecom</Anchor> </React.View> ; }ReactAppRegistry;
Questions
If something is undocumented here, and it is not clear with you, feel free to create an issue here, I will tried my best to answer you.
Anything else
Feel free to request new features, just create an issue. It will be very welcome to pull request for me.
My email me@idickyt.com
Facebook Dicky Tsang
Sina Weibo @桐乃