import React, { useState, useEffect, useRef } from 'react';
import { Tooltip } from 'antd';

const EllipsisText = ({ text, width }) => {
  return (
    <Tooltip title={text}>
      <div
        style={{
          width,
          whiteSpace: 'nowrap',
          overflow: 'hidden',
          textOverflow: 'ellipsis',
        }}
      >
        {text}
      </div>
    </Tooltip>
  );
};

export default EllipsisText;
