turash/bugulma/frontend/components/ui/Container.tsx
Damir Mukimov 6347f42e20
Consolidate repositories: Remove nested frontend .git and merge into main repository
- Remove nested git repository from bugulma/frontend/.git
- Add all frontend files to main repository tracking
- Convert from separate frontend/backend repos to unified monorepo
- Preserve all frontend code and development history as tracked files
- Eliminate nested repository complexity for simpler development workflow

This creates a proper monorepo structure with frontend and backend
coexisting in the same repository for easier development and deployment.
2025-11-25 06:02:57 +01:00

36 lines
885 B
TypeScript

import { clsx } from 'clsx';
import React from 'react';
type ContainerSize = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
interface ContainerProps extends React.HTMLAttributes<HTMLDivElement> {
size?: ContainerSize;
as?: React.ElementType;
children: React.ReactNode;
}
const SIZE_MAP: Record<ContainerSize, string> = {
sm: 'max-w-4xl',
md: 'max-w-5xl',
lg: 'max-w-6xl',
xl: 'max-w-7xl',
'2xl': 'max-w-screen-2xl',
full: 'max-w-full',
};
const Container = React.forwardRef<HTMLDivElement, ContainerProps>(
({ size = 'lg', as: Component = 'div', className, children, ...props }, ref) => {
const classes = clsx('mx-auto px-4 sm:px-6 lg:px-8', SIZE_MAP[size], className);
return (
<Component ref={ref} className={classes} {...props}>
{children}
</Component>
);
}
);
Container.displayName = 'Container';
export default Container;