text: import ImageGalleryItem from '../ImageGalleryItem';
  import styles from './ImageGallery.module.css';
  import PropTypes from 'prop-types';
  
  const ImageGallery = ({ images, onImgClick }) => {
    return (
      <ul className={styles.ImageGallery} onClick={onImgClick}>
        {images.map(({ id, webformatURL, largeImageURL }) => (
          <ImageGalleryItem
            key={id}
            src={webformatURL}
            largeImg={largeImageURL}
          />
        ))}
      </ul>
    );
  };
  
  ImageGallery.propTypes = {
    pictures: PropTypes.arrayOf(PropTypes.object),
    onImgClick: PropTypes.func.isRequired,
  };
  
  export default ImageGallery;
  