Skip to content
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit 0347182

Browse files
committed
style: postItem with community label & adjust looks
1 parent 1baca4a commit 0347182

File tree

2 files changed

+13
-4
lines changed
  • src/components/PostItem

2 files changed

+13
-4
lines changed

src/components/PostItem/DigestView/DesktopView/Body.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
Extra,
1919
LeftPart,
2020
CommunityLabel,
21+
LabelDivider,
2122
AuthorName,
2223
ItemWrapper,
2324
ViewsIcon,
@@ -33,9 +34,9 @@ const Body: FC<TProps> = ({ item }) => {
3334
<Extra>
3435
<LeftPart>
3536
<CommunityLabel>Elixir</CommunityLabel>
36-
<Dot radius={3} space={8} />
37+
<LabelDivider />
3738
<AuthorName>{item.author.nickname}</AuthorName>
38-
<Dot radius={3} space={8} />
39+
<Dot radius={3} space={10} />
3940
<PublishTime>
4041
<TimeAgo datetime={item.insertedAt} locale="zh_CN" />
4142
</PublishTime>

src/components/PostItem/styles/digest_view/body.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,21 @@ export const CommunityLabel = styled.div`
3232
content: '';
3333
position: absolute;
3434
left: 1px;
35-
top: 4px;
35+
top: 3px;
3636
width: 6px;
37-
height: 10px;
37+
height: 11px;
3838
border-radius: 4px;
3939
background-color: #49a5a0;
4040
}
4141
`
42+
export const LabelDivider = styled.div`
43+
width: 1px;
44+
height: 8px;
45+
margin-left: 10px;
46+
margin-right: 12px;
47+
background-color: #49a5a0;
48+
transform: rotate(12deg);
49+
`
4250
export const AuthorName = styled.div`
4351
color: ${theme('thread.extraInfo')};
4452
font-size: 13px;

0 commit comments

Comments
 (0)