A downstream fork of Tranquil PDS for use in margin.cafe margin.cafe
Something went wrong. Try again.
12345678910111213141516171819<script lang="ts"> import { _ } from '../../lib/i18n' import { toast } from '../../lib/toast.svelte' let { value, label }: { value: string; label?: string } = $props() let copying = $state(false) async function copy() { copying = true try { await navigator.clipboard.writeText(value) toast.success($_('common.copied')) } catch { toast.error($_('common.error')) } finally { copying = false } }</script><button type="button" class="sm secondary copy-value" onclick={copy} disabled={copying} aria-label={label || $_('common.copyToClipboard')}>{$_('common.copyToClipboard')}</button>