This commit is contained in:
2026-02-04 00:06:16 -05:00
parent f08afb2ed1
commit 7b5c256e07
38 changed files with 933 additions and 1 deletions

36
src/components/Tab.tsx Normal file
View File

@@ -0,0 +1,36 @@
export type TabId = "discover" | "feeds" | "search" | "player" | "settings"
export type TabDefinition = {
id: TabId
label: string
}
export const tabs: TabDefinition[] = [
{ id: "discover", label: "Discover" },
{ id: "feeds", label: "My Feeds" },
{ id: "search", label: "Search" },
{ id: "player", label: "Player" },
{ id: "settings", label: "Settings" },
]
type TabProps = {
tab: TabDefinition
active: boolean
onSelect: (tab: TabId) => void
}
export function Tab(props: TabProps) {
return (
<box
border
onMouseDown={() => props.onSelect(props.tab.id)}
style={{ padding: 1, backgroundColor: props.active ? "#333333" : "transparent" }}
>
<text>
{props.active ? "[" : " "}
{props.tab.label}
{props.active ? "]" : " "}
</text>
</box>
)
}