mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
* 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
6 lines
180 B
Svelte
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)}" />
|