From bafc4115026961e270a614e4207dc3ea8ea15f57 Mon Sep 17 00:00:00 2001 From: pawan_m02111 Date: Tue, 24 Dec 2019 15:23:44 +0530 Subject: [PATCH] v0.0.19 --- dist/index.js | 10 +++++++--- package.json | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 980ba10..37adff6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -96,7 +96,7 @@ function (_Component) { elements.push(_react["default"].createElement(_reactNative.Text, _extends({}, componentProps, clickHandlerProps, { key: url + index, style: [component.props.style, _this.props.linkStyle] - }), text)); + }, _this.props.injectViewProps(url)), text)); }); elements.push(component.props.children.substring(_lastIndex, component.props.children.length)); @@ -173,10 +173,14 @@ Hyperlink.propTypes = { linkStyle: textPropTypes.style, linkText: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].func]), onPress: _propTypes["default"].func, - onLongPress: _propTypes["default"].func + onLongPress: _propTypes["default"].func, + injectViewProps: _propTypes["default"].func }; Hyperlink.defaultProps = { - linkify: linkify + linkify: linkify, + injectViewProps: function injectViewProps(i) { + return {}; + } }; Hyperlink.getDerivedStateFromProps = function (nextProps, prevState) { diff --git a/package.json b/package.json index 4b5329f..53ba1c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-hyperlink", - "version": "0.0.18", + "version": "0.0.19", "description": "A component for react-native to make urls, fuzzy links, emails etc clickable", "main": "dist/index.js", "scripts": {