tarkanlar / react-social-buttons

social buttons component for react, includes google, facebook, twitter, pinterest and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-social-buttons

npm version

social buttons component for react, includes google, facebook, twitter, pinterest and more

Install

npm install react-social-buttons --save

Use

import { FacebookLikeButton, TwitterButton } from 'react-social-buttons';

class App {
  render {
    let url = "https://github.com";

    return (
      <div>
        <FacebookLikeButton url={url} />
        <TwitterButton url={url} />
      </div>
    );
  }
}

Examples

simple example

npm run start-simple

then open http://127.0.0.1:5000

react router example

npm run start-rr

then open http://127.0.0.1:5000

there is a home route which lists some books, each book has some social buttons

Development

build src to lib

npm run build

run tests

npm install
npm test

to run tests in the browser...

npm install webpack -g

compile test.js to a bundle with webpack

webpack ./test/test.js ./test/test-bundle.js

open test.html to view the tests in the browser

License

MIT

About

social buttons component for react, includes google, facebook, twitter, pinterest and more


Languages

Language:JavaScript 98.3%Language:HTML 1.7%