u
This commit is contained in:
@@ -65,13 +65,13 @@ class ArticlePhoto extends Component {
|
||||
fill || objectFit === 'cover'
|
||||
? { position: 'absolute', inset: 0 }
|
||||
: {
|
||||
position: 'absolute',
|
||||
maxWidth: '100%',
|
||||
maxHeight: '100%',
|
||||
aspectRatio,
|
||||
width: photo.thumbW >= photo.thumbH ? '100%' : 'auto',
|
||||
height: photo.thumbH > photo.thumbW ? '100%' : 'auto',
|
||||
}
|
||||
position: 'absolute',
|
||||
maxWidth: '100%',
|
||||
maxHeight: '100%',
|
||||
aspectRatio,
|
||||
width: photo.thumbW >= photo.thumbH ? '100%' : 'auto',
|
||||
height: photo.thumbH > photo.thumbW ? '100%' : 'auto',
|
||||
}
|
||||
}
|
||||
>
|
||||
<ThumbHashImage thumbHash={photo.thumbHash} />
|
||||
@@ -87,21 +87,21 @@ class ArticlePhoto extends Component {
|
||||
sx={
|
||||
fill || objectFit === 'cover'
|
||||
? {
|
||||
display: 'block',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
objectFit: 'cover',
|
||||
opacity: thumbLoaded ? 1 : 0,
|
||||
}
|
||||
display: 'block',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
objectFit: 'cover',
|
||||
opacity: thumbLoaded ? 1 : 0,
|
||||
}
|
||||
: {
|
||||
display: 'block',
|
||||
maxWidth: '100%',
|
||||
maxHeight: '100%',
|
||||
width: 'auto',
|
||||
height: 'auto',
|
||||
objectFit: 'contain',
|
||||
opacity: thumbLoaded ? 1 : 0,
|
||||
}
|
||||
display: 'block',
|
||||
maxWidth: '100%',
|
||||
maxHeight: '100%',
|
||||
width: 'auto',
|
||||
height: 'auto',
|
||||
objectFit: 'contain',
|
||||
opacity: thumbLoaded ? 1 : 0,
|
||||
}
|
||||
}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user