Skip to content

Commit

Permalink
dist update
Browse files Browse the repository at this point in the history
  • Loading branch information
obipawan committed Apr 21, 2018
1 parent 8693689 commit 724d5a4
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,20 @@ var Hyperlink = function (_Component) {
_lastIndex = lastIndex;
if (_this2.props.linkText) text = typeof _this2.props.linkText === 'function' ? _this2.props.linkText(url) : _this2.props.linkText;

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

elements.push(_react2.default.createElement(
_reactNative.Text,
_extends({}, componentProps, linkComponentProps, {
_extends({}, componentProps, {
key: url + index,
style: [component.props.style, _this2.props.linkStyle],
onPress: function onPress() {
return _this2.props.onPress && _this2.props.onPress(url, text);
}
style: [component.props.style, _this2.props.linkStyle]
}),
text
));
Expand Down

0 comments on commit 724d5a4

Please sign in to comment.