import { cva } from "class-variance-authority"

import styles from "./maxWidth.module.css"

import type { MaxWidthProps } from "@/types/components/max-width"

const maxWidthVariants = cva(styles.container)

export default function MaxWidth({
  className,
  tag = "section",
  ...props
}: MaxWidthProps
) {
  const Cmp = tag
  return <Cmp className={maxWidthVariants({ className })} {...props} />
}
