From 40c1fbf4bf08879b52ffb0b009c76b6f4eb6a543 Mon Sep 17 00:00:00 2001 From: Jose Manuel Serrano Amaut <a20122128@pucp.pe> Date: Fri, 10 Mar 2023 13:03:01 -0500 Subject: [PATCH] [REF]: Improved component to give the src a width when final width is undef due to smart is false --- src/files-ui/components/previews/ImagePreview/ImagePreview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/files-ui/components/previews/ImagePreview/ImagePreview.tsx b/src/files-ui/components/previews/ImagePreview/ImagePreview.tsx index cdf344a..3f0c0e4 100644 --- a/src/files-ui/components/previews/ImagePreview/ImagePreview.tsx +++ b/src/files-ui/components/previews/ImagePreview/ImagePreview.tsx @@ -82,7 +82,7 @@ const ImagePreview: React.FC<ImagePreviewProps> = ( onClick={(evt) => { evt.preventDefault(); }} - width={finalWidth} + width={!smart && !finalWidth?"100%":finalWidth} height={finalHeight} src={source} alt={alt} -- GitLab