bodjay / svelte-copy-to-clipboard

A flexible copy to clipboard component for Svelte
https://svelte-copy-to-clipboard.netlify.com/
MIT License
24 stars 7 forks source link

Error in readme #9

Closed bpiwowar closed 3 years ago

bpiwowar commented 4 years ago

There is an error in the example provided in the README

<CopyToClipboard text={exampleText} on:copy={handleSuccessfullyCopied} on:fail={handleFailedCopy} let:onCopy>
    <button on:click={onCopy}>An element to trigger the copy</button>
</CopyToClipboard>

should be (let:onCopy should be let:copy, and latter on:click={onCopy} should be on:click={copy})

<CopyToClipboard text={exampleText} on:copy={handleSuccessfullyCopied} on:fail={handleFailedCopy} let:copy>
    <button on:click={copy}>An element to trigger the copy</button>
</CopyToClipboard>