import React, { Fragment } from 'react'; import PropTypes from 'prop-types'; import { gettext } from '../../utils/constants'; import Lightbox from '@seafile/react-image-lightbox'; import '@seafile/react-image-lightbox/style.css'; const propTypes = { imageItems: PropTypes.array.isRequired, imageIndex: PropTypes.number.isRequired, closeImagePopup: PropTypes.func.isRequired, moveToPrevImage: PropTypes.func.isRequired, moveToNextImage: PropTypes.func.isRequired }; class ImageDialog extends React.Component { constructor(props) { super(props); } render() { const imageItems = this.props.imageItems; const imageIndex = this.props.imageIndex; const imageItemsLength = imageItems.length; const name = imageItems[imageIndex].name; const imageTitle = `${name} (${imageIndex + 1}/${imageItemsLength})`; return ( ); } } ImageDialog.propTypes = propTypes; export default ImageDialog;