import { Flex } from 'antd';
import classNames from 'classnames';
import './InfoGroupTitle.less';

type InfoGroupTitleProps = {
  /** 标题 */
  title: string;
  /** 自定义类名 */
  className?: string;
  /** 自定义样式 */
  style?: React.CSSProperties;
};

/**
 * 信息组标题
 */
function InfoGroupTitle({ title, style, className }: InfoGroupTitleProps) {
  return (
    <Flex align="center" className={classNames('kf-info-group-title', className)} style={style}>
      <img
        src={require('@/assets/img/code-name-icon.png')}
        className="kf-info-group-title__image"
        alt=""
        draggable={false}
      />
      <span className="kf-info-group-title__text">{title}</span>
    </Flex>
  );
}

export default InfoGroupTitle;
