Skip to content

Commit

Permalink
fix: fix the text-card button
Browse files Browse the repository at this point in the history
  • Loading branch information
lialila committed Oct 23, 2024
1 parent cc86666 commit 19e0f68
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions src/components/TextCardWithIcon/TextCardWithIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,28 @@ export const TextCardWithIcon: React.FC<TextCardWithIconProps> = ({
</Box>
)}
{!image && Icon}
<div>
<Flex alignItems="center" gap="2" mb={image ? '2' : '0'} mt={image ? '6' : '0'}>
<Flex flexDirection="column">
<Flex
alignItems="center"
justifyContent="flex-start"
gap="2"
mb={image ? '2' : '0'}
mt={image ? '6' : '0'}
>
{image && Icon}
<Heading as="h6" size="xs" mb="2">
{title}
</Heading>
</Flex>
<Text size="smRegularNormal">{text}</Text>
{button && (
<Button width="full" mt="6" size="lg" onClick={button.onClick}>
{button.text}
</Button>
)}
</div>
<Text size="smRegularNormal" marginBottom="6">
{text}
</Text>
</Flex>
{button && (
<Button mt="auto" size="lg" onClick={button.onClick}>
{button.text}
</Button>
)}
</Box>
);
};

0 comments on commit 19e0f68

Please sign in to comment.