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

27 lines
483 B
TypeScript

import { ReactNode } from 'react';
import { Box } from './Box';
export interface ContainerProps {
children: ReactNode;
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
}
export const Container = ({
children,
size = 'lg'
}: ContainerProps) => {
const sizeMap = {
sm: '40rem',
md: '48rem',
lg: '64rem',
xl: '80rem',
full: '100%',
};
return (
<Box marginX="auto" maxWidth={sizeMap[size]} paddingX={4} fullWidth>
{children}
</Box>
);
};