Skip to content

Commit ba23a30

Browse files
benfrontifyBenfrontifyragi96
authored
feat: image placeholder display bug (#1261)
* feat: image placeholder display bug * fix: delete console log --------- Co-authored-by: Benfrontify <ben.laemmin@frontify.com> Co-authored-by: Rafael Giezendanner <rafael.giezendanner@frontify.com>
1 parent c44aaf2 commit ba23a30

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/thumbnail-grid-block/src/components/Thumbnail/ImageWrapper.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ export const ImageWrapper = ({
1919
setContainerRef,
2020
}: ImageWrapperProps): ReactElement => {
2121
const { width, alignmentClassNames, imageIsAboveOrBelow } = thumbnailStyles;
22-
2322
return (
2423
<div
2524
className={merge([placeholderWrapper && 'tw-min-w-fit', alignmentClassNames])} // placeholderWrapper && 'tw-min-w-fit' can be removed if placeholder width keeps same behaviour as image, as it does now
2625
style={{ width: imageIsAboveOrBelow ? 'auto' : width }}
2726
data-test-id="thumbnail-image-wrapper"
2827
>
29-
<div className="tw-flex" style={{ width: imageIsAboveOrBelow ? width : 'auto' }} ref={setContainerRef}>
28+
<div
29+
className={merge(['tw-flex', placeholderWrapper && 'tw-min-w-fit'])}
30+
style={{ width: imageIsAboveOrBelow ? width : 'auto' }}
31+
ref={setContainerRef}
32+
>
3033
{children}
3134
</div>
3235
</div>

0 commit comments

Comments
 (0)