1.0.3 • Published 3 years ago

svelte-action-clipboard v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Installation

npm install svelte-action-clipboard

Usage

<script>
  import { aClipboard } from "svelte-action-clipboard";

  let text = "Nisi nulla veniam quis pariatur velit nisi voluptate sint dolor.";
</script>

<div>{text}</div>

<button 
  use:aClipboard={{ event: "click", text }}
  on:copied={(e) => doSomething(e.detail.clipboard)}
  on:error={(e) => doSomethingElse(e.detail.error)}>
  Copy to clipboard
</button>

License

Distributed under the MIT License.

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago