website poc
This commit is contained in:
30
apps/website/components/ui/Container.tsx
Normal file
30
apps/website/components/ui/Container.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { ReactNode } from 'react';
|
||||
|
||||
interface ContainerProps {
|
||||
size?: 'sm' | 'md' | 'lg' | 'xl';
|
||||
center?: boolean;
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function Container({
|
||||
size = 'lg',
|
||||
center = false,
|
||||
children,
|
||||
className = ''
|
||||
}: ContainerProps) {
|
||||
const sizeStyles = {
|
||||
sm: 'max-w-2xl',
|
||||
md: 'max-w-4xl',
|
||||
lg: 'max-w-7xl',
|
||||
xl: 'max-w-[1400px]'
|
||||
};
|
||||
|
||||
const centerStyles = center ? 'text-center' : '';
|
||||
|
||||
return (
|
||||
<div className={`mx-auto ${sizeStyles[size]} ${centerStyles} ${className}`}>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user