import KFIcon from '@/components/KFIcon';
import { Tooltip } from 'antd';
import styles from './index.less';

export type CopyingTextProps = {
  text: string;
};

function CopyingText({ text }: CopyingTextProps) {
  return (
    <div className={styles['copying-text']}>
      <span className={styles['copying-text__text']}>{text}</span>
      <Tooltip title="复制">
        <KFIcon
          id="copying"
          data-clipboard-text={text}
          type="icon-fuzhi2"
          className={styles['copying-text__icon']}
          color="#606b7a"
        />
      </Tooltip>
    </div>
  );
}

export default CopyingText;
