import cn from '@/lib/merge-clsx';

interface IContainer extends React.HTMLAttributes<HTMLElement> {
  as?: React.ElementType;
  className?: string;
}

const Container: React.FC<IContainer> = (props) => {
  const { as, className, ...rest } = props;
  const Component = as || 'div';

  return (
    <Component
      {...rest}
      className={cn('mx-auto max-w-screen-2xl px-4 sm:px-8', className)}
    />
  );
};

export default Container;
