From 1fac215151f8613cb6021eb91f8dbf9b1aab8996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=9Eorkell=20M=C3=A1ni=20=C3=9Eorkelsson?= Date: Wed, 10 Jul 2024 13:23:23 +0000 Subject: [PATCH] fix: action card tag if no heading --- .../src/components/ActionCard/ActionCard.tsx | 39 ++++++++++--------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/libs/service-portal/core/src/components/ActionCard/ActionCard.tsx b/libs/service-portal/core/src/components/ActionCard/ActionCard.tsx index b16c3c091f66..b2b5bb7f109d 100644 --- a/libs/service-portal/core/src/components/ActionCard/ActionCard.tsx +++ b/libs/service-portal/core/src/components/ActionCard/ActionCard.tsx @@ -339,13 +339,13 @@ export const ActionCard: React.FC> = ({ {/* Checking image type so the image is placed correctly */} {image?.type !== 'logo' && renderImage()} - {heading && ( - + + {heading && ( > = ({ {heading} - - {secondaryTag && ( - - {!date && !eyebrow && renderTag(secondaryTag)} - - )} - {!date && !eyebrow && renderTag(tag)} - - - )} - {text && {text}} + )} + {!heading && text && ( + {text} + )} + + {secondaryTag && ( + + {!date && !eyebrow && renderTag(secondaryTag)} + + )} + {!date && !eyebrow && renderTag(tag)} + + + {heading && text && {text}} {subText && {subText}}