react-clipboard-simple

1.1.1 • Public • Published

react-clipboard-simple

Component that allows user to copy text on simple click.

Install

npm install react-clipboard-simple --save #or... yarn add react-clipboard-simple

Usage

import  React  from  "react";
import  ReactClipboard  from  "react-clipboard-simple";

export  default  function  App() {
let  data = [
			{
			title:  "Joy",
			symbol:  "😂",
			keywords:"face with tears of joy happy silly smiley cry laugh laugh emotion emotion sarcastic sarcastic"
			},{
			title:  "Smiley",
			symbol:  "😃",
			keywords:"smiling face with open mouth happy smiley emotion emotion good good",
			}];
return (
		<div>
		{data.map((emoji) => {
			return (
					<ReactClipboard  keyword={emoji.keywords}>
					<h1>{emoji.symbol}</h1>
					</ReactClipboard>
			);
		})}
		</div>
);
}

Package Sidebar

Install

npm i react-clipboard-simple

Weekly Downloads

1

Version

1.1.1

License

ISC

Unpacked Size

2.04 kB

Total Files

3

Last publish

Collaborators

  • naqvi