Avoid reflow by showing chat thunk status in a toast

This commit is contained in:
Jon Staab
2025-08-19 14:03:04 -07:00
parent 4f6c08f8a2
commit cde03ec0fe
26 changed files with 268 additions and 124 deletions
+11 -6
View File
@@ -21,12 +21,17 @@
class:bg-base-100={theme === "info"}
class:text-base-content={theme === "info"}
class:alert-error={theme === "error"}>
<p class="welshman-content-error">
{@html renderAsHtml(parse({content: $toast.message}))}
{#if $toast.action}
<Button class="cursor-pointer underline" onclick={onActionClick}>
{$toast.action.message}
</Button>
<p class:welshman-content-error={theme === "error"}>
{#if $toast.message}
{@html renderAsHtml(parse({content: $toast.message}))}
{#if $toast.action}
<Button class="cursor-pointer underline" onclick={onActionClick}>
{$toast.action.message}
</Button>
{/if}
{:else if $toast.children}
{@const {component: Component, props} = $toast?.children || {}}
<Component toast={$toast} {...props} />
{/if}
</p>
<Button class="flex items-center opacity-75" onclick={() => popToast($toast.id)}>