fix(ui/posts): add padding to post link card (#9883)

This commit is contained in:
gaurav2733 2024-02-26 13:50:02 +05:30 committed by GitHub
parent c1332c65fa
commit 1c5e66d10d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -28,7 +28,11 @@ const LogoContainer = styled.div`
align-items: center;
`;
const PlatformLogo = styled(Image)`
const EmptyContainer = styled.div`
padding-left: 25px;
`;
const PlatformLogo = styled(Image)`S
width: auto;
object-fit: contain;
background-color: transparent;
@ -80,13 +84,15 @@ export const PostLinkCard = ({ linkPost }: Props) => {
return (
<CardContainer type="link" href={link} target="_blank" rel="noopener noreferrer">
{hasMedia && (
{hasMedia ? (
<LogoContainer>
<PlatformLogo width={50} height={50} preview={false} src={linkPost?.content?.media?.location} />
</LogoContainer>
) : (
<EmptyContainer />
)}
<TextContainer>
<FlexWrapper alignCenter={!hasMedia}>
<FlexWrapper>
<TextWrapper>
<HeaderText type="secondary">Link</HeaderText>
<Title style={{ margin: 0 }} ellipsis={{ rows: 2 }} level={5}>