clip-file
v1.0.3
Published
``` import useCopyToClipboard from "clip-file"
Downloads
3
Readme
Example
import useCopyToClipboard from "clip-file"
function App() {
const [isCopied, handleCopy] = useCopyToClipboard(time in ms to remove popup);
const text = "Text to copy"
return (
<>
{text}<br />
<button onClick={() => handleCopy(text)}>
{isCopied ? "copied" : "copy"}
</button>
</>
)
}
export default App