Skip to content

Commit

Permalink
fix(ui/posts): add padding to post link card (datahub-project#9883)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav2733 authored Feb 26, 2024
1 parent c1332c6 commit 1c5e66d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions datahub-web-react/src/app/search/PostLinkCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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}>
Expand Down

0 comments on commit 1c5e66d

Please sign in to comment.