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

Commit 575c71e

Browse files
committed
refactor(media-query): improve empty thread
1 parent 6fe5989 commit 575c71e

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

components/EmptyThread/index.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
Icon,
1717
Text,
1818
Title,
19+
DetailText,
1920
DescWrapper,
2021
IssueLink,
2122
} from './styles'
@@ -26,7 +27,7 @@ const debug = makeDebugger('c:EmptyThread:index')
2627
const DescContent = ({ community, thread }) => (
2728
<React.Fragment>
2829
<div>
29-
如果你有 {community} 相关的优质
30+
如果你有 {community} 相关的<DetailText>优质</DetailText>
3031
{Trans(thread)}
3132
,欢迎一起分享 / 交流
3233
</div>
@@ -39,7 +40,7 @@ const DescContent = ({ community, thread }) => (
3940
>
4041
提交issue
4142
</IssueLink>
42-
,以便于开发者排查修复。
43+
<DetailText>,以便于开发者排查修复。</DetailText>
4344
</div>
4445
</React.Fragment>
4546
)
@@ -51,7 +52,9 @@ const EmptyThread = ({ community, thread }) => (
5152
</Icon>
5253
<Text>
5354
<Title>
54-
{community} 社区内未找到符合相关条件的
55+
{community} 社区内未找到<DetailText>符合</DetailText>相关<DetailText>
56+
条件的
57+
</DetailText>
5558
{`${Trans(thread)}信息`}
5659
</Title>
5760
<DescWrapper>

components/EmptyThread/styles/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ export const Title = styled.div`
3535
font-size: 1.3rem;
3636
${cs.media.tablet`
3737
font-size: 1.1rem;
38-
`};
38+
`};
39+
`
40+
41+
export const DetailText = styled.span`
42+
${cs.media.mobile`
43+
display: none;
44+
`};
3945
`
4046

4147
export const DescWrapper = styled.div`

containers/BodyLayout/styles/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ export const ExpanderIcon = styled(Img)`
4242
fill ${theme('banner.desc')};
4343
width: 18px;
4444
height: 20px;
45+
display: block;
4546
`

0 commit comments

Comments
 (0)