Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-share

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-share - npm Package Compare versions

Comparing version 1.8.1 to 1.8.2

4

CHANGELOG.md

@@ -0,1 +1,5 @@

## 1.8.2 (July 8, 2016)
* Added `title` and `description` props for FacebookShareButton. `title` was not working correctly previously.
## 1.8.1 (July 3, 2016)

@@ -2,0 +6,0 @@

8

lib/share-buttons.js

@@ -161,5 +161,7 @@ 'use strict';

return {
description: props.description,
title: props.title
};
}, {
description: _react.PropTypes.string,
title: _react.PropTypes.string.isRequired

@@ -170,9 +172,9 @@ });

return {
hashtags: props.hashtags,
text: props.title,
via: props.via,
hashtags: props.hashtags
via: props.via
};
}, {
hashtags: _react.PropTypes.arrayOf(_react.PropTypes.string),
title: _react.PropTypes.string.isRequired,
url: _react.PropTypes.string.isRequired,
via: _react.PropTypes.string

@@ -179,0 +181,0 @@ });

@@ -48,6 +48,13 @@ 'use strict';

function facebook(url) {
function facebook(url, _ref2) {
var title = _ref2.title;
var description = _ref2.description;
(0, _assert2.default)(url, 'facebook.url');
return 'https://facebook.com/sharer.php' + (0, _utils.objectToGetParams)({ u: url });
return 'https://facebook.com/sharer.php' + (0, _utils.objectToGetParams)({
u: url,
title: title,
description: description
});
}

@@ -61,4 +68,4 @@

function linkedin(url, _ref2) {
var title = _ref2.title;
function linkedin(url, _ref3) {
var title = _ref3.title;

@@ -71,5 +78,5 @@ (0, _assert2.default)(url, 'linkedin.url');

function pinterest(url, _ref3) {
var media = _ref3.media;
var description = _ref3.description;
function pinterest(url, _ref4) {
var media = _ref4.media;
var description = _ref4.description;

@@ -76,0 +83,0 @@ (0, _assert2.default)(url, 'pinterest.url');

{
"name": "react-share",
"version": "1.8.1",
"version": "1.8.2",
"description": "Easy social media share buttons and share counts.",

@@ -5,0 +5,0 @@ "main": "./lib/react-share.js",

# react-share
[![NPM version][npm-image]][npm-url]
[![Download Count][downloads-image]][downloads-url]
> Easy social media share buttons and share counts.

@@ -78,26 +81,14 @@

Required props for all:
##### Share button props
* `children`: A React node (e.g. string or element)
| |Required props|Optional props|
|-------|--------|--------------|
|__All__|__`children`__: A React node (e.g. string or element)<br />__`url`__: URL of the shared page (string)|__`disabled`__: Disables click action and adds `disabled` class (bool)<br/>__`disabledStyle`__: Style when button is disabled (object, default = { opacity: 0.6 })|
|FacebookShareButton|-|__`title`__: Title of the shared page (string)<br/>__`description`__: Description of the shared page (string)|
|GooglePlusShareButton|-|-|
|LinkedinShareButton|__`title`__: Title of the shared page (string)|-|
|TwitterShareButton|__`title`__: Title of the shared page (string)|__`via`__: (string)<br/>__`hashtags`__: (array)|
|PinterestShareButton|__`media`__: An absolute link to the image that will be pinned (string)|__`description`__: Description for the shared media.|
|VKShareButton|-|-|
* `url`: URL of the shared page (string)
Optional props for all:
* `disabled`: Disables click action and adds `disabled` class (bool)
* `disabledStyle`: Style when button is disabled (object, default = { opacity: 0.6 })
Required props for `LinkedinShareButton` and `TwitterShareButton`:
* `title`: Title of the shared page (string)
Required prop for `PinterestShareButton`:
* `media`: An absolute link to the image that will be pinned (string)
Optional props for `PinterestShareButton`:
* `description`: Description for the shared media.
### Share counts

@@ -104,0 +95,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc