Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Add installation instructions
  • Loading branch information
daramasala authored Aug 14, 2017
1 parent 0fbf488 commit 55d4cef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ Text component for React Native with regex defined hyperlinks.
Heavily inspired from [react-native-hyperlink](https://github.com/obipawan/react-native-hyperlink/blob/master/README.md).

The difference is that with react-native-hyperlink you use linkify which I couldn't configure to detect arbitrary regex without prefix (e.g. '1:00'). If you only need to detect regexs with prefixes (e.g. mentions with '@' or links with 'schema://') then use hyperlink. react-native-hyperlink also supports nesting `<Text>` components.
## Usage Examples
**Important** - put only strings inside a `<HyperlinkedText>` component. There is no way to nest components right now.

# Installation
`npm install --save react-native-hyperlinked-text` or
`yarn add react-native-hyperlinked-text`
# Usage Examples
The default behavior is to identify URLs and open web browser when they are clicked:
```JSX
<HyperlinkedText>You get regular URLs handling by default - https://www.kimaia.com</HyperlinkedText>
Expand Down

0 comments on commit 55d4cef

Please sign in to comment.