/*
 * @Author: 赵伟
 * @Date: 2025-03-11 10:52:23
 * @Description: 用于内容可变的表格类标题
 */

import { Typography } from 'antd';
import classNames from 'classnames';
import './index.less';

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

function TableColTitle({ title, className, style }: TableColTitleProps) {
  return (
    <Typography.Paragraph
      ellipsis={{ tooltip: title }}
      className={classNames('kf-table-col-title', className)}
      style={style}
    >
      {title}
    </Typography.Paragraph>
  );
}

export default TableColTitle;
