mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
if width is specified, keep images aspect ratio (#1595)
This commit is contained in:
@@ -70,7 +70,11 @@ export function ImageWithPlaceholderWhileLoading({
|
|||||||
width={width}
|
width={width}
|
||||||
height={height}
|
height={height}
|
||||||
onLoad={() => setLoading(false)}
|
onLoad={() => setLoading(false)}
|
||||||
style={{ ...style, display: loading ? "none" : (style?.display ?? "initial") }}
|
style={{
|
||||||
|
...style,
|
||||||
|
display: loading ? "none" : (style?.display ?? "initial"),
|
||||||
|
height: style?.width ? "auto" : style?.height,
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user