mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
- 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.
36 lines
885 B
TypeScript
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;
|