Files
gridpilot.gg/apps/website/ui/ErrorPageContainer.tsx
2026-01-18 23:24:30 +01:00

35 lines
910 B
TypeScript

import { ReactNode } from 'react';
import { Box } from './Box';
import { Surface } from './Surface';
export interface ErrorPageContainerProps {
children: ReactNode;
size?: 'sm' | 'md' | 'lg';
variant?: 'default' | 'glass';
}
export const ErrorPageContainer = ({ children, size = 'md', variant = 'default' }: ErrorPageContainerProps) => {
const sizeMap = {
sm: '24rem',
md: '32rem',
lg: '42rem',
};
return (
<Box
minHeight="100vh"
display="flex"
alignItems="center"
justifyContent="center"
padding={4}
bg="var(--ui-color-bg-base)"
position="relative"
overflow="hidden"
>
<Surface variant={variant} rounded="xl" padding={8} style={{ maxWidth: sizeMap[size], width: '100%', border: '1px solid var(--ui-color-border-default)', position: 'relative', zIndex: 10 }}>
{children}
</Surface>
</Box>
);
};