import React, { ComponentPropsWithoutRef, ElementRef, forwardRef } from "react"
import { classNames } from "../../utils/classNames"

type Props = {
  children: React.ReactNode
  className?: string
} & ComponentPropsWithoutRef<"div">

export const ChartContainer = forwardRef<ElementRef<"div">, Props>(
  function ChartContainer({ children, className, ...rest }, ref) {
    return (
      <div
        className={classNames("relative cursor-crosshair", className)}
        ref={ref}
        {...rest}
      >
        {children}
      </div>
    )
  },
)
