Skip to content

Commit 0f0ebb5

Browse files
committed
[frontend] move new tab button to hang after last tab
1 parent d22cf89 commit 0f0ebb5

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

frontend/src/tabs.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import iconClose from "@ktibow/iconset-material-symbols/close";
2+
import iconAdd from "@ktibow/iconset-material-symbols/add";
23
import {
34
createState,
45
type Component,
@@ -194,6 +195,7 @@ export const Tabs: Component<
194195
tabs: Tab[];
195196
activetab: Tab;
196197
destroyTab: (tab: Tab) => void;
198+
addTab: () => void;
197199
},
198200
{
199201
container: HTMLElement;
@@ -383,7 +385,9 @@ export const Tabs: Component<
383385
transitionend={transitionend}
384386
/>
385387
))}
386-
<div class="extra after" this={use(this.afterEl).bind()}></div>
388+
<div class="extra after" this={use(this.afterEl).bind()}>
389+
<IconButton icon={iconAdd} click={this.addTab}></IconButton>
390+
</div>
387391
<div class="extra right" this={use(this.rightEl).bind()}></div>
388392
</div>
389393
);
@@ -399,7 +403,11 @@ Tabs.css = `
399403
}
400404
401405
.extra {
406+
top: 0px;
407+
height: 100%;
402408
position: absolute;
409+
display: flex;
410+
align-items: center;
403411
}
404412
405413
.left {

0 commit comments

Comments
 (0)