carbon-components-svelte/docs/src/pages/framed/CopyButton/CopyButtonOverride.svelte
Eric Liu 921c3e121a
Remove clipboard-copy dependency from CodeSnippet, CopyButton (#726)
* chore(deps): remove clipboard-copy

* feat: add copy prop, use navigator.clipboard API

* docs: add clipboard-copy back to docsite for more browser support

* docs(component-api): use outbound link

* docs: add override/prevent copy examples
2021-07-05 12:12:28 -07:00

6 lines
180 B
Svelte

<script>
import copy from "clipboard-copy";
import { CopyButton } from "carbon-components-svelte";
</script>
<CopyButton text="Carbon svelte" copy="{(text) => copy(text)}" />