copyToClipboard
copyToClipboard is a function that can be used to copy specified content.
<script lang="ts">
import { copyToClipboard } from 'stwui/utils';
function handleClick() {
copyToClipboard('COPIED');
}
</script>
<div class="flex items-center justify-center p-12">
<button on:click={handleClick} class="bg-primary text-white rounded-md px-4 py-2">
Click to copy "COPIED"
</button>
</div>