fix(tui): Fix TypeScript error in tips.tsx

This commit is contained in:
01luyicheng
2026-02-01 10:37:58 +08:00
parent d43a1f5eec
commit 5cbe764fa7

View File

@@ -1,5 +1,6 @@
import { createMemo, createSignal, For } from "solid-js"
import { DEFAULT_THEMES, useTheme } from "@tui/context/theme"
import { Locale } from "@/util/locale"
const themeCount = Object.keys(DEFAULT_THEMES).length
const themeTip = `Use {highlight}/theme{/highlight} or {highlight}Ctrl+X T{/highlight} to switch between ${themeCount} built-in themes`
@@ -39,9 +40,9 @@ export function Tips() {
<text flexShrink={0} style={{ fg: theme.warning }}>
Tip{" "}
</text>
<text flexShrink={1} wrapMode="none">
<text flexShrink={1} wrapMode="none" overflow="hidden">
<For each={parts}>
{(part) => <span flexShrink={0} style={{ fg: part.highlight ? theme.text : theme.textMuted }}>{part.text}</span>}
{(part) => <span style={{ fg: part.highlight ? theme.text : theme.textMuted }}>{part.text}</span>}
</For>
</text>
</box>