import React from 'react';
import { Image } from 'antd';
const Preview = ({ imageUrl, isPreview, setIsPreview }: any) => {
  return (
    <Image
      width={0}
      style={{ display: 'none' }}
      src={imageUrl}
      rootClassName="preview_img"
      preview={{
        visible: isPreview,
        src: imageUrl,
        onVisibleChange: value => {
          setIsPreview(value);
        },
      }}
    />
  );
};

export default Preview;
