mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 18:07:57 +00:00
fix(ui): posts - fix formatting for posts where the title can get cut off (#8001)
This commit is contained in:
parent
ada78cb617
commit
0fa983adc7
@ -9,7 +9,6 @@ import { PostLinkCard } from '../search/PostLinkCard';
|
||||
const RecommendationContainer = styled.div`
|
||||
margin-bottom: 92px;
|
||||
max-width: 1000px;
|
||||
min-width: 750px;
|
||||
`;
|
||||
|
||||
const ContentContainer = styled.div`
|
||||
@ -30,6 +29,9 @@ const ThinDivider = styled(Divider)`
|
||||
|
||||
const TextPostsContainer = styled.div`
|
||||
margin-bottom: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
`;
|
||||
|
||||
const LinkPostsContainer = styled.div`
|
||||
|
||||
@ -7,8 +7,7 @@ import { Post } from '../../types.generated';
|
||||
const CardContainer = styled.div`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-bottom: 12px;
|
||||
height: 140px;
|
||||
min-height: 140px;
|
||||
border: 1px solid ${ANTD_GRAY[4]};
|
||||
border-radius: 12px;
|
||||
box-shadow: ${(props) => props.theme.styles['box-shadow']};
|
||||
@ -26,8 +25,9 @@ const TextContainer = styled.div`
|
||||
flex-direction: column;
|
||||
`;
|
||||
|
||||
const Title = styled(Typography.Title)`
|
||||
const TitleText = styled(Typography.Title)`
|
||||
word-break: break-word;
|
||||
min-height: 20px;
|
||||
`;
|
||||
|
||||
const HeaderText = styled(Typography.Text)`
|
||||
@ -48,14 +48,14 @@ export const PostTextCard = ({ textPost }: Props) => {
|
||||
<CardContainer>
|
||||
<TextContainer>
|
||||
<HeaderText type="secondary">Announcement</HeaderText>
|
||||
<Title
|
||||
<TitleText
|
||||
ellipsis={{
|
||||
rows: 1,
|
||||
}}
|
||||
level={5}
|
||||
>
|
||||
{textPost?.content?.title}
|
||||
</Title>
|
||||
</TitleText>
|
||||
<AnnouncementText>{textPost?.content?.description}</AnnouncementText>
|
||||
</TextContainer>
|
||||
</CardContainer>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user