Limit width of very wide images to avoid horizontal overflow
This fixes #45
This commit is contained in:
parent
813190751f
commit
59de859d50
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue