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;
|
margin: 4px;
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
`
|
`
|
||||||
|
|
||||||
const StyledPhoto = styled(ProtectedImage)`
|
const StyledPhoto = styled(ProtectedImage)`
|
||||||
|
@ -111,7 +112,7 @@ export const Photo = ({
|
||||||
key={photo.id}
|
key={photo.id}
|
||||||
style={{
|
style={{
|
||||||
cursor: onSelectImage ? 'pointer' : null,
|
cursor: onSelectImage ? 'pointer' : null,
|
||||||
minWidth: `${minWidth}px`,
|
minWidth: `min(${minWidth}px, 100% - 8px)`,
|
||||||
}}
|
}}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onSelectImage && onSelectImage(index)
|
onSelectImage && onSelectImage(index)
|
||||||
|
|
Loading…
Reference in New Issue