How to use the react-share.ShareButtons function in react-share

To help you get started, we’ve selected a few react-share examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cbgaindia / story-generator / assets / javascripts / templates / components / report_footer.jsx View on Github external
"use strict";
var React      = require("react"),
    ReactShare = require("react-share");

var ShareButtons = ReactShare.ShareButtons;
var FacebookShareButton = ShareButtons.FacebookShareButton;
var TwitterShareButton = ShareButtons.TwitterShareButton;
var GooglePlusShareButton = ShareButtons.GooglePlusShareButton;

var generateShareIcon = ReactShare.generateShareIcon;
var FacebookIcon = generateShareIcon('facebook');
var TwitterIcon = generateShareIcon('twitter');
var GooglePlusIcon = generateShareIcon('google');

var url = window.location.href;
var title = "Online Budget Analysis Tool";

var tempArray = url.split("#");
var embedString = "#/embed";
var embedUrl = tempArray[0] + embedString + tempArray[1];

react-share

Social media share buttons and share counts for React.

MIT
Latest version published 9 months ago

Package Health Score

69 / 100
Full package analysis