8000 GitHub - okmttdhr/sharer.npm.js: :on: Create your own social share buttons
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Jan 9, 2022. It is now read-only.

okmttdhr/sharer.npm.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sharer.npm.js is the node package module for Sharer.js. Checkout the official docs page for more info.

Installing

npm install sharer.npm.js

Usage

(sample using with react)

import Sharer from 'sharer.npm.js';

class Sample extends React.Component {
  handleClick(e) {
    const sharer = new Sharer(e.target)
    sharer.share()
  }

  render() {
    return (
      <button
        onClick={::this.handleClick}
        className='sharer button'
        data-sharer='twitter'
        data-title='Checkout Sharer.js!'
        data-url='https://ellisonleao.github.io/sharer.js/'>
        Share on Twitter
      </button>
    )
  }
}

About

🔛 🔖 Create your own social share buttons

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 12

0