({
activeView,
onSelectView,
}: {
activeView: AppView;
onSelectView: (view: AppView) => void;
})
| 107 | } |
| 108 | |
| 109 | function AppShell({ |
| 110 | activeView, |
| 111 | onSelectView, |
| 112 | }: { |
| 113 | activeView: AppView; |
| 114 | onSelectView: (view: AppView) => void; |
| 115 | }) { |
| 116 | const scrollTargetRef = useRef<HTMLDivElement | null>(null); |
| 117 | |
| 118 | return ( |
| 119 | <div className="flex h-dvh min-h-0 flex-col overflow-hidden bg-app-bg text-theme-text-strong"> |
| 120 | <ScrollArea |
| 121 | ref={scrollTargetRef} |
| 122 | axis="y" |
| 123 | className="min-h-0 flex-1" |
| 124 | > |
| 125 | <ShellHeader |
| 126 | activeView={activeView} |
| 127 | onSelectView={onSelectView} |
| 128 | scrollTargetRef={scrollTargetRef} |
| 129 | /> |
| 130 | <main className="mx-auto flex w-full max-w-5xl flex-col gap-12 px-4 py-8 sm:px-6 sm:py-10"> |
| 131 | {activeView === "primitives" ? ( |
| 132 | <PrimitivesPage /> |
| 133 | ) : activeView === "compositions" ? ( |
| 134 | <CompositionsPage /> |
| 135 | ) : activeView === "modules" ? ( |
| 136 | <ModulesPage /> |
| 137 | ) : activeView === "colors" ? ( |
| 138 | <ColorsPage /> |
| 139 | ) : null} |
| 140 | </main> |
| 141 | </ScrollArea> |
| 142 | </div> |
| 143 | ); |
| 144 | } |
| 145 | |
| 146 | function DebugShowcase({ |
| 147 | activeView, |
nothing calls this directly
no outgoing calls
no test coverage detected