Skip to content

Commit

Permalink
fix: action card tag if no heading
Browse files Browse the repository at this point in the history
  • Loading branch information
thorkellmani committed Jul 10, 2024
1 parent 99b1814 commit 1fac215
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions libs/service-portal/core/src/components/ActionCard/ActionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,13 +339,13 @@ export const ActionCard: React.FC<React.PropsWithChildren<ActionCardProps>> = ({
{/* Checking image type so the image is placed correctly */}
{image?.type !== 'logo' && renderImage()}
<Box flexDirection="row" width="full">
{heading && (
<Box
display="flex"
flexDirection="row"
justifyContent="spaceBetween"
alignItems={['flexStart', 'flexStart', 'flexEnd']}
>
<Box
display="flex"
flexDirection="row"
justifyContent="spaceBetween"
alignItems={['flexStart', 'flexStart', 'flexEnd']}
>
{heading && (
<Box
display="flex"
flexDirection="row"
Expand All @@ -365,17 +365,20 @@ export const ActionCard: React.FC<React.PropsWithChildren<ActionCardProps>> = ({
{heading}
</Text>
</Box>
<Hidden above="xs">
{secondaryTag && (
<Box marginRight="smallGutter">
{!date && !eyebrow && renderTag(secondaryTag)}
</Box>
)}
<Box>{!date && !eyebrow && renderTag(tag)}</Box>
</Hidden>
</Box>
)}
{text && <Text paddingTop={heading ? 1 : 0}>{text}</Text>}
)}
{!heading && text && (
<Text paddingTop={heading ? 1 : 0}>{text}</Text>
)}
<Hidden above="xs">
{secondaryTag && (
<Box marginRight="smallGutter">
{!date && !eyebrow && renderTag(secondaryTag)}
</Box>
)}
<Box>{!date && !eyebrow && renderTag(tag)}</Box>
</Hidden>
</Box>
{heading && text && <Text paddingTop={heading ? 1 : 0}>{text}</Text>}
{subText && <Text>{subText}</Text>}
</Box>
<Box
Expand Down

0 comments on commit 1fac215

Please sign in to comment.