From 8cef5faec22c9357901164c7f5a7e5d42e8f63ab Mon Sep 17 00:00:00 2001 From: kirsty-hames Date: Wed, 24 Apr 2024 13:32:37 +0100 Subject: [PATCH 1/2] provide a default display of _imageAlignment: "right" in the instance _imageAlignment isn't set --- templates/hotgridPopup.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/hotgridPopup.jsx b/templates/hotgridPopup.jsx index 05fc575..756e077 100644 --- a/templates/hotgridPopup.jsx +++ b/templates/hotgridPopup.jsx @@ -30,7 +30,7 @@ export default function HotgridPopup(props) { _isRound && 'is-round', _isVisited && 'is-visited', _isActive && 'is-active', - _imageAlignment && `align-image-${_imageAlignment}` + _imageAlignment ? `align-image-${_imageAlignment}` : 'align-image-right' ])} key={index} data-index={index} @@ -76,7 +76,7 @@ export default function HotgridPopup(props) { - {(_imageAlignment === 'right' || _imageAlignment === 'bottom') && + {(_imageAlignment !== 'left' && _imageAlignment !== 'top') && Date: Wed, 24 Apr 2024 14:57:32 +0100 Subject: [PATCH 2/2] only apply _imageAlignment class if item has image --- templates/hotgridPopup.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/hotgridPopup.jsx b/templates/hotgridPopup.jsx index 756e077..1423517 100644 --- a/templates/hotgridPopup.jsx +++ b/templates/hotgridPopup.jsx @@ -30,7 +30,7 @@ export default function HotgridPopup(props) { _isRound && 'is-round', _isVisited && 'is-visited', _isActive && 'is-active', - _imageAlignment ? `align-image-${_imageAlignment}` : 'align-image-right' + _graphic?.src && `align-image-${_imageAlignment || 'right'}` ])} key={index} data-index={index}