Skip to content

Commit

Permalink
v0.0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
obipawan committed Apr 26, 2018
1 parent 4d21bf6 commit e9ae3de
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,19 @@ var Hyperlink = function (_Component) {
_lastIndex = lastIndex;
if (_this2.props.linkText) text = typeof _this2.props.linkText === 'function' ? _this2.props.linkText(url) : _this2.props.linkText;

var clickHandlerProps = {};
if (OS !== 'web') {
componentProps.onLongPress = _this2.props.onLongPress ? function () {
clickHandlerProps.onLongPress = _this2.props.onLongPress ? function () {
return _this2.props.onLongPress(url, text);
} : undefined;
}
componentProps.onPress = _this2.props.onPress ? function () {
clickHandlerProps.onPress = _this2.props.onPress ? function () {
return _this2.props.onPress(url, text);
} : undefined;

elements.push(_react2.default.createElement(
_reactNative.Text,
_extends({}, componentProps, {
_extends({}, componentProps, clickHandlerProps, {
key: url + index,
style: [component.props.style, _this2.props.linkStyle]
}),
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-hyperlink",
"version": "0.0.13",
"version": "0.0.14",
"description": "A <Hyperlink /> component for react-native to make urls, fuzzy links, emails etc clickable",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit e9ae3de

Please sign in to comment.