fix(targets): copy button stops row navigation; recolor shared badge

- CopyButton now stops click propagation so it copies instead of opening
  the target detail page
- shared-infra badge fuchsia -> teal
This commit is contained in:
Yogesh Ojha
2026-05-31 09:06:41 +05:30
parent bff07d64e9
commit 19d24b67a8
2 changed files with 4 additions and 3 deletions
@@ -13,7 +13,8 @@
let copied = $state(false);
let failed = $state(false);
async function copy() {
async function copy(e?: MouseEvent) {
e?.stopPropagation();
try {
await navigator.clipboard.writeText(value);
copied = true;
@@ -33,7 +34,7 @@
variant="ghost"
size="icon"
class="h-7 w-7 shrink-0 {className}"
onclick={copy}
onclick={(e) => copy(e)}
>
{#if copied}
<Check class="h-3.5 w-3.5 text-green-500" />
@@ -83,7 +83,7 @@
<Tooltip.Trigger>
<button
type="button"
class="inline-flex items-center gap-1 text-[11px] text-fuchsia-600 dark:text-fuchsia-400 hover:text-fuchsia-700 dark:hover:text-fuchsia-300 transition-colors cursor-pointer"
class="inline-flex items-center gap-1 text-[11px] text-teal-600 dark:text-teal-400 hover:text-teal-700 dark:hover:text-teal-300 transition-colors cursor-pointer"
onclick={handleClick}
>
<Share2 class="h-3 w-3" />