react-share
Advanced tools
Comparing version 1.14.1 to 1.15.0
@@ -0,1 +1,6 @@ | ||
## 1.15.0 (Jun 18, 2017) | ||
* Use new WhatsApp API (thanks @renchap!). | ||
* A11y update: handle Enter-keypress when share button is on focus. | ||
## 1.14.1 (Jun 4, 2017) | ||
@@ -2,0 +7,0 @@ |
@@ -108,2 +108,6 @@ 'use strict'; | ||
} | ||
}, _this.onKeyPress = function (e) { | ||
if (e.key === 'Enter' || e.key === 13) { | ||
_this.onClick(e); | ||
} | ||
}, _temp), (0, _possibleConstructorReturn3.default)(_this, _ret); | ||
@@ -145,2 +149,3 @@ } | ||
onClick: this.onClick, | ||
onKeyPress: this.onKeyPress, | ||
className: classes, | ||
@@ -147,0 +152,0 @@ style: (0, _extends3.default)({}, style, disabled ? disabledStyle : {}) }, |
@@ -66,3 +66,3 @@ 'use strict'; | ||
(0, _assert2.default)(url, 'whatsapp.url'); | ||
return 'whatsapp://send' + (0, _utils.objectToGetParams)({ | ||
return 'https://api.whatsapp.com/send' + (0, _utils.objectToGetParams)({ | ||
text: title + separator + url | ||
@@ -69,0 +69,0 @@ }); |
{ | ||
"name": "react-share", | ||
"version": "1.14.1", | ||
"version": "1.15.0", | ||
"description": "Easy social media share buttons and share counts.", | ||
@@ -5,0 +5,0 @@ "main": "./lib/react-share.js", |
@@ -101,7 +101,2 @@ # react-share | ||
##### Notes | ||
Whatsapp share button uses `whatsapp` protocol in shared links (`whatsapp://send`). | ||
Thus, it is meant to be used on mobile views and will not work on (all) desktop web browsers. | ||
### Share counts | ||
@@ -108,0 +103,0 @@ |
54840
876
174