react-clipboard-simple
Version:
Component that allows user to copy text on simple click.
47 lines (34 loc) • 939 B
Markdown
Component that allows user to copy text on simple click.
npm install react-clipboard-simple --save
yarn add react-clipboard-simple
```js
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>
);
}
```