import React, { forwardRef } from "react";
import cn from "classnames";

interface ITabContentProps {
  as?: React.ElementType;
  className?: string;
}

const TabContent: React.FC<ITabContentProps> = forwardRef(
  ({ className, children, as: Component = "div", ...props }, ref) => {
    return (
      <Component {...props} ref={ref} className={cn("tab-content", className)}>
        {children}
      </Component>
    );
  }
);

TabContent.displayName = "TabContent";

export default TabContent;
