This repository was archived by the owner on Nov 8, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +19
-4
lines changed
components/LoadingEffects
containers/CommunitiesContent Expand file tree Collapse file tree 3 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import R from 'ramda'
5
5
import {
6
6
BannerWrapper ,
7
7
BannerText ,
8
+ CommunitiesText ,
8
9
SidebarText ,
9
10
} from './styles/community_holder'
10
11
@@ -13,6 +14,9 @@ const CommunityHolder = ({ place, text }) => {
13
14
case 'sidebar' : {
14
15
return < SidebarText > { R . toUpper ( text . slice ( 0 , 1 ) ) } </ SidebarText >
15
16
}
17
+ case 'communities' : {
18
+ return < CommunitiesText > { R . toUpper ( text . slice ( 0 , 2 ) ) } </ CommunitiesText >
19
+ }
16
20
default : {
17
21
return (
18
22
< BannerWrapper >
@@ -25,7 +29,7 @@ const CommunityHolder = ({ place, text }) => {
25
29
26
30
CommunityHolder . propTypes = {
27
31
text : PropTypes . string . isRequired ,
28
- place : PropTypes . oneOf ( [ 'banner' , 'sidebar' ] ) ,
32
+ place : PropTypes . oneOf ( [ 'banner' , 'sidebar' , 'communities' ] ) ,
29
33
}
30
34
31
35
CommunityHolder . defaultProps = {
Original file line number Diff line number Diff line change @@ -13,13 +13,23 @@ export const BannerWrapper = styled.div`
13
13
border-color: ${ theme ( 'banner.desc' ) } ;
14
14
color: ${ theme ( 'banner.desc' ) } ;
15
15
`
16
-
17
16
export const SidebarText = styled . div `
18
17
color: ${ theme ( 'sidebar.holder' ) } ;
19
18
text-align: center;
20
19
margin-left: 5px;
21
20
`
22
-
21
+ export const CommunitiesText = 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
+ `
23
33
export const BannerText = styled . div `
24
34
${ cs . truncate ( '45px' ) } ;
25
35
text-align: center;
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import R from 'ramda'
3
3
4
4
// import { ICON_CMD } from '../../config'
5
5
// import { Wrapper } from './styles'
6
- import { TrendLine } from '../../components'
6
+ import { TrendLine , CommunityHolder } from '../../components'
7
7
import SubscribeBtn from './SubscribeBtn'
8
8
9
9
import {
@@ -30,6 +30,7 @@ const CommunityCard = ({ community, restProps }) => (
30
30
< CommunityIcon
31
31
nonFill = { R . contains ( community . raw , NON_FILL_COMMUNITY ) }
32
32
src = { community . logo }
33
+ loading = { < CommunityHolder text = { community . raw } place = "communities" /> }
33
34
/>
34
35
< CardTitle > { community . title } </ CardTitle >
35
36
< CardDesc > { community . desc } </ CardDesc >
You can’t perform that action at this time.
0 commit comments