Files
gridpilot.gg/apps/website/components/dashboard/DashboardShell.tsx
2026-01-18 23:24:30 +01:00

40 lines
1.0 KiB
TypeScript

import { Box } from '@/ui/Box';
import { Header } from '@/ui/Header';
import { MainContent } from '@/ui/MainContent';
import { Sidebar } from '@/ui/Sidebar';
import React from 'react';
interface DashboardShellProps {
children: React.ReactNode;
rail?: React.ReactNode;
controlBar?: React.ReactNode;
}
/**
* DashboardShell
*
* The primary layout container for the Telemetry Workspace.
* Orchestrates the sidebar rail, top control bar, and main content area.
*/
export function DashboardShell({ children, rail, controlBar }: DashboardShellProps) {
return (
<Box display="flex" height="100vh" style={{ overflow: 'hidden', backgroundColor: 'var(--ui-color-bg-base)' }}>
{rail && (
<Sidebar>
{rail}
</Sidebar>
)}
<Box display="flex" flexDirection="col" flex={1} style={{ overflow: 'hidden' }}>
{controlBar && (
<Header>
{controlBar}
</Header>
)}
<MainContent maxWidth="7xl">
{children}
</MainContent>
</Box>
</Box>
);
}