stretch small images to fit the container
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Martti Malmi 2023-12-13 14:08:44 +02:00
parent f124082f6f
commit 87ad31df30

View File

@ -48,7 +48,9 @@ const ImageElement = ({ url, meta, onMediaClick }: ImageElementProps) => {
key={url}
src={url}
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}
ref={imageRef}
/>
@ -83,6 +85,7 @@ const VideoElement = ({ url }: VideoElementProps) => {
controls
poster={proxy(url)}
className="max-h-[80vh] md:max-h-[510px] md:rounded-sm"
onClick={e => e.stopPropagation()}
/>
</div>
);