diff --git a/CHANGELOG.md b/CHANGELOG.md index e0538ea..dead584 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Fixed + +- Adds the height prop to the image but without adding the maxHeight as default value + ## [0.22.0] - 2024-06-25 ### Added diff --git a/react/modules/imageAsList.tsx b/react/modules/imageAsList.tsx index 864b390..2f47465 100644 --- a/react/modules/imageAsList.tsx +++ b/react/modules/imageAsList.tsx @@ -6,7 +6,7 @@ import type { ImagesSchema } from '../ImageTypes' export const getImagesAsJSXList = ( images: ImagesSchema, isMobile: boolean, - height: string | number, + maxHeight: string | number, preload?: boolean, experimentalPreventLayoutShift?: boolean, experimentalSetExplicitDimensions?: boolean @@ -21,7 +21,7 @@ export const getImagesAsJSXList = ( experimentalPreventLayoutShift: experimentalPreventLayoutShiftChild, experimentalSetExplicitDimensions: experimentalSetExplicitDimensionsChild, width = '100%', - height: _height, + height, ...props }, idx @@ -30,9 +30,9 @@ export const getImagesAsJSXList = ( key={idx} src={isMobile && mobileImage ? mobileImage : image} alt={description} - maxHeight={height} + maxHeight={maxHeight} width={width} - height={_height ?? height} + height={height} experimentalPreventLayoutShift={ experimentalPreventLayoutShift ?? experimentalPreventLayoutShiftChild }