Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

Commit11fa42e

Browse files
committed
style(icon loading): add to communities icons
1 parentbe9648f commit11fa42e

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

‎components/LoadingEffects/CommunityHolder.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import R from 'ramda'
55
import{
66
BannerWrapper,
77
BannerText,
8+
CommunitiesText,
89
SidebarText,
910
}from'./styles/community_holder'
1011

@@ -13,6 +14,9 @@ const CommunityHolder = ({ place, text }) => {
1314
case'sidebar':{
1415
return<SidebarText>{R.toUpper(text.slice(0,1))}</SidebarText>
1516
}
17+
case'communities':{
18+
return<CommunitiesText>{R.toUpper(text.slice(0,2))}</CommunitiesText>
19+
}
1620
default:{
1721
return(
1822
<BannerWrapper>
@@ -25,7 +29,7 @@ const CommunityHolder = ({ place, text }) => {
2529

2630
CommunityHolder.propTypes={
2731
text:PropTypes.string.isRequired,
28-
place:PropTypes.oneOf(['banner','sidebar']),
32+
place:PropTypes.oneOf(['banner','sidebar','communities']),
2933
}
3034

3135
CommunityHolder.defaultProps={

‎components/LoadingEffects/styles/community_holder.js‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,23 @@ export const BannerWrapper = styled.div`
1313
border-color:${theme('banner.desc')};
1414
color:${theme('banner.desc')};
1515
`
16-
1716
exportconstSidebarText=styled.div`
1817
color:${theme('sidebar.holder')};
1918
text-align: center;
2019
margin-left: 5px;
2120
`
22-
21+
exportconstCommunitiesText=styled.div`
22+
${cs.flex('align-center')};
23+
color:${theme('banner.desc')};
24+
justify-content: center;
25+
width: 60px;
26+
height: 60px;
27+
border-radius: 4px;
28+
border-style: double;
29+
border-color:${theme('banner.desc')};
30+
text-align: center;
31+
margin-top: -40px;
32+
`
2333
exportconstBannerText=styled.div`
2434
${cs.truncate('45px')};
2535
text-align: center;

‎containers/CommunitiesContent/CommunityCards.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import R from 'ramda'
33

44
// import { ICON_CMD } from '../../config'
55
// import { Wrapper } from './styles'
6-
import{TrendLine}from'../../components'
6+
import{TrendLine,CommunityHolder}from'../../components'
77
importSubscribeBtnfrom'./SubscribeBtn'
88

99
import{
@@ -30,6 +30,7 @@ const CommunityCard = ({ community, restProps }) => (
3030
<CommunityIcon
3131
nonFill={R.contains(community.raw,NON_FILL_COMMUNITY)}
3232
src={community.logo}
33+
loading={<CommunityHoldertext={community.raw}place="communities"/>}
3334
/>
3435
<CardTitle>{community.title}</CardTitle>
3536
<CardDesc>{community.desc}</CardDesc>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp