Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
agsulimko committed Sep 18, 2023
1 parent 9b036ef commit 87cddf4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/components/ImageGallery/ImageGallery.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const ImageGallery = ({ hits }) => {
<ul className={css.listImageGallery}>
{hits.map(hit => (
<ImageGalleryItem hit={hit} key={hit.id} />

))}
</ul>
</div>
Expand Down
16 changes: 10 additions & 6 deletions src/components/ImageGalleryItem/ImageGalleryItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,26 @@ const style = {
left: '50%',
transform: 'translate(-50%, -50%)',
// width: 1200,
bgcolor: 'background.paper',
// bgcolor: 'background.paper',
bgcolor: 'rgba(205, 214, 219, 0)',
border: 'none',
boxShadow: 24,
width: 0,
p: 4,
padding: 0,


};

const ImageGalleryItem = ({hit:{webformatURL,largeImageURL, tags},id}) =>{
const [open, setOpen] = React.useState(false);
const handleOpen = () => setOpen(true);
const handleOpen = () => setOpen(true) ;
const handleClose = () => setOpen(false);


return(

<>
<li onClick={handleOpen} className="gallery-item">
<li onClick={handleOpen} className="gallery-item" >
<img src={webformatURL} alt={tags} width={260}height={150}/>
</li>
<div>
Expand All @@ -36,7 +39,8 @@ return(
aria-labelledby="modal-modal-title"
aria-describedby="modal-modal-description"
>
<Box sx={style}>
<Box sx={style}>

<img src= {largeImageURL}
alt={tags} style={{ width: 800, marginBottom: -50, }} />

Expand Down
4 changes: 2 additions & 2 deletions src/components/Searchbar/Searchbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export default class Searchbar extends Component {
<TextField
// className="input"
type="text"
// autocomplete="off"
// autofocus
autocomplete="off"
autofocus
// placeholder="Search images and photos"
name='title'
size="small"
Expand Down

0 comments on commit 87cddf4

Please sign in to comment.