Skip to content

Commit

Permalink
[CARE-2063] Use original image width for contained images
Browse files Browse the repository at this point in the history
  • Loading branch information
fgyimah committed Jul 19, 2023
1 parent d97dcd3 commit 515c891
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/elements/Image/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}
Expand Down

0 comments on commit 515c891

Please sign in to comment.