import styles from './index.less';

interface InfoItemProps {
  data: any;
  onClick?: () => void;
}

const InfoItem = ({ data, onClick }: InfoItemProps) => {
  return (
    <div className={styles.container} onClick={onClick}>
      <img src={data?.coverList?.[0]} alt="" className={styles.icon} />
      <div className={styles.rCont}>
        <div className={styles.title}>{data?.title}</div>
        <div className={styles.area}>
          <span>{data?.source}</span>&nbsp;
          {/* <span>{data?.type}</span> */}
        </div>
        <div>{data?.publishTime}</div>
      </div>
    </div>
  );
};

export default InfoItem;
