still self referencing

This commit is contained in:
2026-02-05 01:43:10 -05:00
parent ea9ab4d3f9
commit 9fa52d71ca
13 changed files with 263 additions and 141 deletions

View File

@@ -1,3 +1,5 @@
import { useTheme } from "../context/ThemeContext"
export type TabId = "discover" | "feeds" | "search" | "player" | "settings"
export type TabDefinition = {
@@ -20,11 +22,12 @@ type TabProps = {
}
export function Tab(props: TabProps) {
const { theme } = useTheme()
return (
<box
border
onMouseDown={() => props.onSelect(props.tab.id)}
style={{ padding: 1, backgroundColor: props.active ? "var(--color-primary)" : "transparent" }}
style={{ padding: 1, backgroundColor: props.active ? theme.primary : "transparent" }}
>
<text>
{props.active ? "[" : " "}