Stop propagation on thunk status

This commit is contained in:
Jon Staab
2025-05-12 15:35:13 -07:00
parent 1ced5689c3
commit db408ac30d
+5 -4
View File
@@ -1,5 +1,6 @@
<script lang="ts">
import {nth} from "@welshman/lib"
import {stopPropagation} from "svelte/legacy"
import {nth, noop} from "@welshman/lib"
import {PublishStatus} from "@welshman/net"
import {
MergedThunk,
@@ -60,7 +61,7 @@
{@const url = failedUrls[0]}
{@const status = $thunk.status[url]}
{@const message = $thunk.details[url]}
<div class="flex justify-end px-1 text-xs {restProps.class}">
<button class="flex justify-end px-1 text-xs {restProps.class}" onclick={stopPropagation(noop)}>
<Tippy
class="flex items-center {restProps.class}"
component={ThunkStatusDetail}
@@ -73,7 +74,7 @@
</span>
{/snippet}
</Tippy>
</div>
</button>
{:else if showPending}
<div class="flex justify-end px-1 text-xs {restProps.class}">
<span class="flex items-center gap-1 {restProps.class}">
@@ -84,7 +85,7 @@
class="underline transition-all"
class:link={canCancel}
class:opacity-25={!canCancel}
onclick={abort}>
onclick={stopPropagation(abort)}>
Cancel
</button>
</span>