mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-29 22:18:12 +00:00
27 lines
925 B
TypeScript
27 lines
925 B
TypeScript
import { Box, Stack, type MantineSpacing } from "@mantine/core";
|
|
import type { ReactNode } from "react";
|
|
|
|
export interface PageContainerProps {
|
|
children: ReactNode;
|
|
/** Drop the max-width cap for full-bleed pages (boards, very wide tables). */
|
|
fluid?: boolean;
|
|
/** Vertical gap between the page's stacked sections. */
|
|
gap?: MantineSpacing;
|
|
}
|
|
|
|
/**
|
|
* Standard page shell: one consistent inset + a vertical Stack so every
|
|
* dashboard page shares the same outer padding and inter-section rhythm.
|
|
* The surrounding AppShell.Main already paints the page background, so this
|
|
* never sets its own — pages stay on the shared `edr-bg` surface.
|
|
*/
|
|
export function PageContainer({ children, fluid = false, gap = "lg" }: PageContainerProps) {
|
|
return (
|
|
<Box px="lg" py="lg" mx="auto" w="100%" maw={fluid ? undefined : 1600}>
|
|
<Stack gap={gap}>{children}</Stack>
|
|
</Box>
|
|
);
|
|
}
|
|
|
|
export default PageContainer;
|