//文本前带圆点
import { Popover } from 'antd';
import classNames from 'classnames';
import { CSSProperties } from 'react';
import styles from './index.less';
interface DotTextProps {
  dotcolor: string; //圆点颜色
  title: string; //文本
  textColor?: string; //文本颜色
  titleStyle?: CSSProperties; //title样式
}
const DotText: React.FC<DotTextProps> = ({
  textColor = '#666',
  dotcolor,
  title,
  titleStyle,
}) => {
  return (
    <div
      className={styles.dottext}
      style={{ '--color': dotcolor } as CSSProperties}
    >
      <Popover content={title}>
        <span
          style={{ '--fontcolor': textColor, ...titleStyle } as CSSProperties}
          className={classNames(styles.type, 'textellipsis')}
        >
          {title}
        </span>
      </Popover>
    </div>
  );
};
export default DotText;
