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

46
src/App.tsx Normal file
View File

@@ -0,0 +1,46 @@
const createSignal = <T,>(value: T): [() => T, (next: T) => void] => {
let current = value
return [() => current, (next) => {
current = next
}]
}
import { Layout } from "./components/Layout"
import { Navigation } from "./components/Navigation"
import { TabNavigation } from "./components/TabNavigation"
import { KeyboardHandler } from "./components/KeyboardHandler"
import { SyncPanel } from "./components/SyncPanel"
import type { TabId } from "./components/Tab"
export function App() {
const activeTab = createSignal<TabId>("discover")
return (
<KeyboardHandler onTabSelect={activeTab[1]}>
<Layout
header={
<TabNavigation
activeTab={activeTab[0]()}
onTabSelect={activeTab[1]}
/>
}
footer={
<Navigation activeTab={activeTab[0]()} onTabSelect={activeTab[1]} />
}
>
<box style={{ padding: 1 }}>
{activeTab[0]() === "settings" ? (
<SyncPanel />
) : (
<box border style={{ padding: 2 }}>
<text>
<strong>{`${activeTab[0]()}`}</strong>
<br />
<span>Content placeholder</span>
</text>
</box>
)}
</box>
</Layout>
</KeyboardHandler>
)
}