Skip to content

Commit 03f346b

Browse files
committed
Add onLongPress prop to README
1 parent 2b7fd1b commit 03f346b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class MyComponent extends Component {
2020
render() {
2121
return (
2222
<Autolink
23-
text="This is the string to parse for urls (https://github.com/joshswan/react-native-autolink), phone numbers (415-555-5555), emails (josh@sportifik.com), mentions/handles (@twitter), and hashtags (#exciting)"
23+
text="This is the string to parse for urls (https://github.com/joshswan/react-native-autolink), phone numbers (415-555-5555), emails (josh@example.com), mentions/handles (@twitter), and hashtags (#exciting)"
2424
hashtag="instagram"
2525
mention="twitter" />
2626
);
@@ -41,8 +41,9 @@ class MyComponent extends Component {
4141
| `url` | `Boolean` | `true` | Enable url linking (`https://{url}`). |
4242
| `stripPrefix` | `Boolean` | `true` | Enable stripping of protocol from link text (`https://url` -> `url`). |
4343
| `linkStyle` | `TextStyle` | | Custom styling to apply to Text nodes of links. |
44-
| `onPress` | `function` | | Custom function handler for link press events. Arguments: `link:String`, `match:Object`. *See [Autolinker.js match object](http://gregjacobs.github.io/Autolinker.js/docs/#!/api/Autolinker.match.Match) for more information about the match object.* |
45-
| `renderLink` | `function` | | Custom render function for rendering link nodes. Arguments: `text:String`, `match:Object`, `index:Number`. *See [Autolinker.js match object](http://gregjacobs.github.io/Autolinker.js/docs/#!/api/Autolinker.match.Match) for more information about the match object.* |
44+
| `onPress` | `function` | | Custom function handler for link press events. Arguments: `url:String`, [`match:Object`][match-url]. |
45+
| `onLongPress` | `function` | | Function handler for long press events. Arguments: `url:String`, [`match:Object`][match-url] |
46+
| `renderLink` | `function` | | Custom render function for rendering link nodes. Arguments: `text:String`, [`match:Object`][match-url], `index:Number`. |
4647
| `showAlert` | `Boolean` | `false` | Displays an alert before leaving the app to help with accidental clicks. Possible values: `true`, `false` |
4748
| `truncate` | `Number` | `32` | Truncate long link text for display (e.g. `https://www.google.com/../something.html`). Possible values: `0` to disable, `1+` to truncate to that maximum length. |
4849
| `truncateChars` | `String` | `..` | Characters to replace truncated url segments with, if enabled. |
@@ -58,3 +59,4 @@ class MyComponent extends Component {
5859
[devdepstat-image]: https://david-dm.org/joshswan/react-native-autolink/dev-status.svg
5960
[npm-url]: https://www.npmjs.com/package/react-native-autolink
6061
[npm-image]: https://badge.fury.io/js/react-native-autolink.svg
62+
[match-url]: http://greg-jacobs.com/Autolinker.js/api/index.html#!/api/Autolinker.match.Match

0 commit comments

Comments
 (0)