website refactor
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React from 'react';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
|
||||
interface DashboardShellProps {
|
||||
children: React.ReactNode;
|
||||
@@ -16,24 +16,24 @@ interface DashboardShellProps {
|
||||
*/
|
||||
export function DashboardShell({ children, rail, controlBar }: DashboardShellProps) {
|
||||
return (
|
||||
<Box display="flex" h="screen" overflow="hidden" bg="base-black" color="white">
|
||||
<Stack direction="row" h="screen" overflow="hidden" bg="base-black" color="white">
|
||||
{rail && (
|
||||
<Box as="aside" w="16" flexShrink={0} borderRight bg="surface-charcoal" borderColor="var(--color-outline)">
|
||||
<Stack as="aside" w="16" flexShrink={0} borderRight bg="surface-charcoal" borderColor="var(--color-outline)">
|
||||
{rail}
|
||||
</Box>
|
||||
</Stack>
|
||||
)}
|
||||
<Box display="flex" flexGrow={1} flexDirection="col" overflow="hidden">
|
||||
<Stack flexGrow={1} overflow="hidden">
|
||||
{controlBar && (
|
||||
<Box as="header" h="14" borderBottom bg="surface-charcoal" borderColor="var(--color-outline)">
|
||||
<Stack as="header" h="14" borderBottom bg="surface-charcoal" borderColor="var(--color-outline)">
|
||||
{controlBar}
|
||||
</Box>
|
||||
</Stack>
|
||||
)}
|
||||
<Box as="main" flexGrow={1} overflow="auto" p={6}>
|
||||
<Box maxWidth="7xl" mx="auto" display="flex" flexDirection="col" gap={6}>
|
||||
<Stack as="main" flexGrow={1} overflow="auto" p={6}>
|
||||
<Stack maxWidth="7xl" mx="auto" gap={6} fullWidth>
|
||||
{children}
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
</Box>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Stack>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user