mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-26 17:37:33 +00:00
fix(ui/posts): add padding to post link card (#9883)
This commit is contained in:
parent
c1332c65fa
commit
1c5e66d10d
@ -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}>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user