11import styled from 'styled-components'
22
3- import Img from '@/Img'
43import { theme , css } from '@/utils'
54
6- import ImgFallback from '@/components/ImgFallback'
7- import { getLiSize , getAvatarSize , getUlMarginRight } from './metric'
5+ import { getAvatarSize , getUlMarginRight } from './metric'
86import type { TAvatarSize } from '../spec'
97
108export const Wrapper = styled . ul < { total : number } > `
@@ -15,53 +13,13 @@ export const Wrapper = styled.ul<{ total: number }>`
1513 padding: 0px 8px 0px 0px;
1614 margin-right: ${ ( { total } ) => getUlMarginRight ( total ) } ;
1715`
18- // height: 49px;
19- type TBaseAvatarItem = { size : TAvatarSize ; noHoverMargin : boolean }
20- const BaseAvatarItem = styled . li < TBaseAvatarItem > `
21- margin: 0px 0px 0px 0px;
22- padding: 0px 0px 0px 0px;
23- position: relative;
24- width: ${ ( { size } ) => getLiSize ( size ) } ;
25-
26- &:hover {
27- margin-left: ${ ( { noHoverMargin } ) => ( noHoverMargin ? '0' : '10px' ) } ;
28- margin-right: ${ ( { noHoverMargin } ) => ( noHoverMargin ? '0' : '10px' ) } ;
29- transition-delay: 0.1s;
30- }
31- transition: all 0.1s;
32- `
33-
34- export const AvatarsItem = styled ( BaseAvatarItem ) `
35- margin: 0px 0px 0px 0px;
36- padding: 0px 0px 0px 0px;
37- position: relative;
38- width: ${ ( { size } ) => getLiSize ( size ) } ;
39- filter: grayscale(0.3);
40- &:hover {
41- filter: grayscale(0);
42- }
43-
44- transition: all 0.1s;
16+ export const AvatarsWrapper = styled . div `
17+ ${ css . flex ( ) }
18+ flex-direction: row-reverse;
4519`
4620export const TotalOneOffset = styled . span `
4721 margin-right: 10px;
4822`
49- type TAvatarsImg = { size : string ; onClick : ( ) => void ; scrollPosition : any }
50- export const AvatarsImg = styled ( Img ) < TAvatarsImg > `
51- border: 2px solid;
52- border-color: ${ theme ( 'thread.commentsUserBorder' ) } ;
53- border-radius: 100px 100px 100px 100px;
54- color: #ffffff;
55- font-family: sans-serif;
56- font-size: 12px;
57- font-weight: 100;
58-
59- width: ${ ( { size } ) => getAvatarSize ( size ) } ;
60- height: ${ ( { size } ) => getAvatarSize ( size ) } ;
61- display: block;
62-
63- text-align: center;
64- `
6523type TAvatarsMore = { size : TAvatarSize ; total : number }
6624export const AvatarsMore = styled . span < TAvatarsMore > `
6725 ${ css . flex ( 'align-both' ) } ;
@@ -82,7 +40,3 @@ export const AvatarsMore = styled.span<TAvatarsMore>`
8240 cursor: pointer;
8341 }
8442`
85- export const AvatarFallback = styled ( ImgFallback ) `
86- border: 1px solid;
87- border-color: #113744;
88- `
0 commit comments