carbon-components-svelte/tests/CopyButton.test.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

11 lines
178 B
Svelte

<script lang="ts">
import { CopyButton } from "../types";
</script>
<CopyButton
text="text"
on:click
on:copy
copy="{(text) => {}}"
feedback="Copied to clipboard"
/>