forked from coracle/flotilla
Avoid reflow by showing chat thunk status in a toast
This commit is contained in:
@@ -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)}>
|
||||
|
||||
Reference in New Issue
Block a user