do not stretch photos

maybe this can be an option?
This commit is contained in:
2022-04-19 18:52:50 +00:00
committed by Stepan Usatiuk
parent 088db35675
commit e020261a4b
3 changed files with 25 additions and 138 deletions

View File

@@ -170,30 +170,31 @@
justify-content: center;
}
.photoPadding {
flex-grow: 1;
}
.photoCard {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
transition: all 0.3s;
transition: 0.3s;
user-select: none;
height: 15rem;
min-width: 10rem;
margin: 0.25rem;
padding: 0rem;
overflow: hidden;
img {
min-height: 100%;
min-width: 100%;
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: cover;
object-fit: scale-down;
}
}

View File

@@ -85,11 +85,13 @@ export const OverviewComponent: React.FunctionComponent<
);
const photosEls = photos.map((photo) => {
return (
<PhotoCard
key={photo.id}
photo={photo}
onClick={() => onCardClick(photo.id)}
/>
<>
<PhotoCard
key={photo.id}
photo={photo}
onClick={() => onCardClick(photo.id)}
/>
</>
);
});
return [