1
Fork 0

Limit width of very wide images to avoid horizontal overflow

This fixes #45
This commit is contained in:
viktorstrate 2020-05-13 12:28:58 +02:00
parent 813190751f
commit 59de859d50
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ const PhotoContainer = styled.div`
margin: 4px;
background-color: #eee;
position: relative;
overflow: hidden;
`
const StyledPhoto = styled(ProtectedImage)`
@ -111,7 +112,7 @@ export const Photo = ({
key={photo.id}
style={{
cursor: onSelectImage ? 'pointer' : null,
minWidth: `${minWidth}px`,
minWidth: `min(${minWidth}px, 100% - 8px)`,
}}
onClick={() => {
onSelectImage && onSelectImage(index)