From a1d368088c9e78ec4505df444be9b9fa5b2d45fb Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Wed, 2 Sep 2026 16:44:26 +0200 Subject: [PATCH] fix tabs size Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- src/components/Tabs.tsx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/Tabs.tsx b/src/components/Tabs.tsx index 97fabaf..1e5b876 100644 --- a/src/components/Tabs.tsx +++ b/src/components/Tabs.tsx @@ -1,6 +1,6 @@ import { type BorderCharacters, type BoxRenderable, type ColorInput, BorderChars, CliRenderEvents, TextAttributes } from "@opentui/core"; import { onResize, useRenderer } from "@opentui/solid"; -import { createMemo, createSignal, For } from "solid-js"; +import { createMemo, createSignal, Index } from "solid-js"; import { theme } from "../index.ts"; export interface TabItem { @@ -126,6 +126,7 @@ export function Tabs(props: TabsProps) { return ( { container = el; remeasureNextFrame(); @@ -137,7 +138,7 @@ export function Tabs(props: TabsProps) { .join("")} - + {(s) => ( <> @@ -145,18 +146,18 @@ export function Tabs(props: TabsProps) { props.onChange(s.value!) : undefined} + fg={s().isActive ? accent() : muted()} + attributes={s().isActive ? TextAttributes.BOLD : undefined} + onMouseDown={theme.mouse && s().value !== undefined ? () => props.onChange(s().value!) : undefined} > - {` ${s.label} `} + {` ${s().label} `} {chars.vertical} )} - + {buildBottomRow(chars, segments(), width())}