diff options
Diffstat (limited to 'source/library/components/TabBar.svelte')
| -rw-r--r-- | source/library/components/TabBar.svelte | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/library/components/TabBar.svelte b/source/library/components/TabBar.svelte index d87449d..9c34f20 100644 --- a/source/library/components/TabBar.svelte +++ b/source/library/components/TabBar.svelte @@ -1,9 +1,10 @@ <script lang="ts"> - import { tick } from "svelte"; + import { tick, type Snippet } from "svelte"; import type { Tab } from "../state/session.svelte.ts"; type Props = { activeId: string; + extras?: Snippet<[{ tab: Tab }]>; onAdd: () => void; onClose: (id: string) => void; onRename: (id: string, title: string) => void; @@ -11,7 +12,7 @@ tabs: Tab[]; }; - let { activeId, onAdd, onClose, onRename, onSelect, tabs }: Props = $props(); + let { activeId, extras, onAdd, onClose, onRename, onSelect, tabs }: Props = $props(); let editingId = $state<string | null>(null); let draft = $state<string>(""); @@ -150,6 +151,7 @@ {:else} <span class="title">{tab.title}</span> {/if} + {#if extras}{@render extras({ tab })}{/if} <button aria-label="Close tab" class="close" |