import type { ElementType, FC, HTMLAttributes } from 'react';
import classnames from 'classnames';
import React from 'react';

export interface TabProps extends HTMLAttributes<HTMLElement> {
  active?: boolean;
  tag?: ElementType;
}

const Tab: FC<TabProps> = ({ active = false, className, tag: Tag = 'div', ...props }) => (
  <Tag className={classnames('tab', { active }, className)} data-testid="Tab" {...props} />
);

export default Tab;
