mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-24 17:44:50 +03:00
fixed stretched images
This commit is contained in:
parent
e7b5fbc17d
commit
583593bea2
@ -19,7 +19,6 @@ const STYLES_IMAGE_CONTAINER = css`
|
|||||||
const STYLES_IMAGE = css`
|
const STYLES_IMAGE = css`
|
||||||
background-color: ${Constants.system.foreground};
|
background-color: ${Constants.system.foreground};
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
transition: 200ms ease all;
|
transition: 200ms ease all;
|
||||||
`;
|
`;
|
||||||
@ -155,7 +154,7 @@ export default class SlateMediaObjectPreview extends React.Component {
|
|||||||
) : this.state.showImage ? (
|
) : this.state.showImage ? (
|
||||||
<img
|
<img
|
||||||
css={STYLES_IMAGE}
|
css={STYLES_IMAGE}
|
||||||
style={{ maxHeight: "100%", ...this.props.imageStyle }}
|
style={{ maxHeight: "100%", maxWidth: "100%", ...this.props.imageStyle }}
|
||||||
src={url}
|
src={url}
|
||||||
/>
|
/>
|
||||||
) : blurhash ? (
|
) : blurhash ? (
|
||||||
@ -171,7 +170,10 @@ export default class SlateMediaObjectPreview extends React.Component {
|
|||||||
punch={1}
|
punch={1}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div css={STYLES_IMAGE} style={{ maxHeight: "100%", ...this.props.imageStyle }} />
|
<div
|
||||||
|
css={STYLES_IMAGE}
|
||||||
|
style={{ maxHeight: "100%", maxWidth: "100%", ...this.props.imageStyle }}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user