11import styled from 'styled-components'
22
3- import { theme , Animate } from '../../../utils'
3+ import { theme , cs } from '../../../utils'
44
55export const Avatars = styled . ul `
6- display: flex;
6+ ${ cs . flex ( ) } ;
7+ flex-direction: row-reverse;
78 list-style-type: none;
89 margin: auto;
9- height: ${ props => props . height } ;
10+ height: ${ ( { height } ) => height } ;
1011 padding: 0px 8px 0px 0px;
11- flex-direction: row-reverse;
1212`
13-
1413// height: 49px;
1514export const AvatarsItem = styled . li `
1615 margin: 0px 0px 0px 0px;
@@ -20,13 +19,15 @@ export const AvatarsItem = styled.li`
2019 opacity: 0.75;
2120 &:hover {
2221 opacity: 1;
23- animation: ${ Animate . pulse } 0.3s linear;
2422 }
23+ ${ Avatars } :hover & {
24+ margin-left: 5px;
25+ }
26+ transition: all 0.3s;
2527`
26-
2728export const AvatarsImg = styled . img `
2829 border: 2px solid;
29- border-color: ${ theme ( 'paper.comments_user_border ' ) } ;
30+ border-color: ${ theme ( 'thread.commentsUserBorder ' ) } ;
3031 border-radius: 100px 100px 100px 100px;
3132 color: #ffffff;
3233 display: block;
@@ -39,18 +40,24 @@ export const AvatarsImg = styled.img`
3940 text-align: center;
4041`
4142
43+ const moreTextSize = total => {
44+ if ( total < 99 ) return '14px'
45+ if ( total >= 100 && total <= 999 ) return '12px'
46+ return '10px'
47+ }
48+
4249export 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' ) } ;
4657 border-radius: 100px 100px 100px 100px;
47- color: grey;
48- display: block;
4958 font-family: sans-serif;
50- font-weight: 100 ;
59+ font-weight: ${ ( { total } ) => ( total >= 1000 ? 600 : 200 ) } ;
5160 height: 30px;
5261 width: 30px;
53- padding-top: 7px;
54- padding-left: 2px;
55- text-align: center;
62+ padding-left: ${ ( { total } ) => ( total >= 1000 ? '5px' : '3px' ) } ;
5663`
0 commit comments