1.0.3 • Published 2 years ago
clip-file v1.0.3
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