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

export interface CardBodyProps extends HTMLAttributes<HTMLElement> {
  tag?: ElementType;
}

const CardBody: FC<CardBodyProps> = ({ className, tag: Tag = 'div', ...rest }) => (
  <Tag className={classnames('card-body', className)} data-testid="CardBody" {...rest} />
);

export default CardBody;
