import React, { ReactNode, CSSProperties } from 'react';
import styles from './index.less';
import { Image } from '@easyv/antd';
import iconUpload from 'images/icon_upload.svg';
import classNames from 'classnames';

const EasyvEmpty = ({
  description = '暂无数据',
  image,
  imageStyle,
  className,
}: {
  description?: ReactNode;
  image?: ReactNode;
  imageStyle?: CSSProperties;
  className?: string;
}) => {
  return (
    <div className={classNames(styles.empty, className)}>
      <Image preview={false} style={imageStyle} src={image || iconUpload} fallback={iconUpload} />
      <p>{description}</p>
    </div>
  );
};

export default EasyvEmpty;
