react-social-buttons
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
npm run start-simple
then open http://127.0.0.1:5000
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