Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(service-portal): action card tag if no heading #15497

Merged
merged 3 commits into from
Jul 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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