From 515c891e1c6eee03605bab7e443f2fcfb8a787d3 Mon Sep 17 00:00:00 2001 From: Francis Gyimah Date: Wed, 19 Jul 2023 11:44:03 +0000 Subject: [PATCH] [CARE-2063] Use original image width for contained images --- src/elements/Image/Image.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/elements/Image/Image.tsx b/src/elements/Image/Image.tsx index a5d4565..22d3a42 100644 --- a/src/elements/Image/Image.tsx +++ b/src/elements/Image/Image.tsx @@ -20,11 +20,7 @@ function getContainerStyle(node: ImageNode): CSSProperties { return {}; } - const width = `${parseFloat(node.width).toFixed(2)}%`; - - if (width === `${(100).toFixed(2)}%`) { - return {}; - } + const width = `${node.file.original_width}px`; return { width }; }