1
1
import styled from 'styled-components'
2
2
3
- import { theme , Animate } from '../../../utils'
3
+ import { theme , cs } from '../../../utils'
4
4
5
5
export const Avatars = styled . ul `
6
- display: flex;
6
+ ${ cs . flex ( ) } ;
7
+ flex-direction: row-reverse;
7
8
list-style-type: none;
8
9
margin: auto;
9
- height: ${ props => props . height } ;
10
+ height: ${ ( { height } ) => height } ;
10
11
padding: 0px 8px 0px 0px;
11
- flex-direction: row-reverse;
12
12
`
13
-
14
13
// height: 49px;
15
14
export const AvatarsItem = styled . li `
16
15
margin: 0px 0px 0px 0px;
@@ -20,13 +19,15 @@ export const AvatarsItem = styled.li`
20
19
opacity: 0.75;
21
20
&:hover {
22
21
opacity: 1;
23
- animation: ${ Animate . pulse } 0.3s linear;
24
22
}
23
+ ${ Avatars } :hover & {
24
+ margin-left: 5px;
25
+ }
26
+ transition: all 0.3s;
25
27
`
26
-
27
28
export const AvatarsImg = styled . img `
28
29
border: 2px solid;
29
- border-color: ${ theme ( 'paper.comments_user_border ' ) } ;
30
+ border-color: ${ theme ( 'thread.commentsUserBorder ' ) } ;
30
31
border-radius: 100px 100px 100px 100px;
31
32
color: #ffffff;
32
33
display: block;
@@ -39,18 +40,24 @@ export const AvatarsImg = styled.img`
39
40
text-align: center;
40
41
`
41
42
43
+ const moreTextSize = total => {
44
+ if ( total < 99 ) return '14px'
45
+ if ( total >= 100 && total <= 999 ) return '12px'
46
+ return '10px'
47
+ }
48
+
42
49
export const AvatarsMore = styled . span `
43
- background-color: #e6edf3;
44
- font-size: 11px;
45
- border: 2px solid #f9fcfc;
50
+ ${ cs . flex ( 'align-center' ) } ;
51
+ justify-content: center;
52
+ font-size: ${ ( { total } ) => moreTextSize ( total ) } ;
53
+
54
+ border-color: ${ theme ( 'thread.articleHover' ) } ;
55
+ color: ${ theme ( 'thread.articleTitle' ) } ;
56
+ background-color: ${ theme ( 'thread.articleHover' ) } ;
46
57
border-radius: 100px 100px 100px 100px;
47
- color: grey;
48
- display: block;
49
58
font-family: sans-serif;
50
- font-weight: 100 ;
59
+ font-weight: ${ ( { total } ) => ( total >= 1000 ? 600 : 200 ) } ;
51
60
height: 30px;
52
61
width: 30px;
53
- padding-top: 7px;
54
- padding-left: 2px;
55
- text-align: center;
62
+ padding-left: ${ ( { total } ) => ( total >= 1000 ? '5px' : '3px' ) } ;
56
63
`
0 commit comments