stretch small images to fit the container
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
f124082f6f
commit
87ad31df30
@ -48,7 +48,9 @@ const ImageElement = ({ url, meta, onMediaClick }: ImageElementProps) => {
|
|||||||
key={url}
|
key={url}
|
||||||
src={url}
|
src={url}
|
||||||
onClick={onMediaClick}
|
onClick={onMediaClick}
|
||||||
className={classNames("max-h-[80vh] md:rounded-sm", { "md:max-h-[510px]": !meta })}
|
className={classNames("max-h-[80vh] w-full h-full object-contain object-left md:rounded-sm", {
|
||||||
|
"md:max-h-[510px]": !meta,
|
||||||
|
})}
|
||||||
style={style}
|
style={style}
|
||||||
ref={imageRef}
|
ref={imageRef}
|
||||||
/>
|
/>
|
||||||
@ -83,6 +85,7 @@ const VideoElement = ({ url }: VideoElementProps) => {
|
|||||||
controls
|
controls
|
||||||
poster={proxy(url)}
|
poster={proxy(url)}
|
||||||
className="max-h-[80vh] md:max-h-[510px] md:rounded-sm"
|
className="max-h-[80vh] md:max-h-[510px] md:rounded-sm"
|
||||||
|
onClick={e => e.stopPropagation()}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user