Natively Pronounced Mandarin
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

react-clipboard-icon

1.1.0 • Public • Published

react-clipboard-icon

is an svg icon from clipboard.js site assets, packaged as a React stateless component

Installation | Usage | Development | License

All credits go to @zenorocha.

clippy

Installation

React is required as a peer dependency. With npm do

npm install react
npm install react-clipboard-icon

Usage

Edit

All props are optional:

  • onClick {Function} : see this CodePen for an example of Clipboard.js + React.
  • size {Number} defaults to 24.
  • style {Object}.
  • title {String} text visible on mouseover.
import React from 'react'
import ClipboardIcon from 'react-clipboard-icon'
 
const style = { fill: 'red' }
 
const MyComponent = () => (
  <div>
    <ClipboardIcon
      size={40}
      style={style}
    />
  </div>
)
 
export default MyComponent

Development

Transpile with npm run build.

Lint code with npm run lint.

Deploy with npm version major|minor|patch.

License

MIT

install

npm i react-clipboard-icon

Downloadsweekly downloads

121

version

1.1.0

license

MIT

homepage

g14n.info

repository

githubgithub

last publish

collaborators

  • avatar