@@ -14,7 +14,6 @@ const getBackgroundColorByName = (firstName: ?string) => {
1414
1515const [ AvatarTag , themeAvatar ] = createThemeTag ( name , ( { COLORS } : * ) => ( {
1616 root : ( props ) => ( {
17- borderRadius : '100%' ,
1817 overflow : 'hidden' ,
1918 display : 'flex' ,
2019 justifyContent : 'center' ,
@@ -23,12 +22,35 @@ const [AvatarTag, themeAvatar] = createThemeTag(name, ({ COLORS }: *) => ({
2322 backgroundColor : getBackgroundColorByName ( props . firstName ) ,
2423 color : COLORS . WHITE ,
2524 fontWeight : 600 ,
26-
27- [ `&:hover ${ AvatarHandleTag } ` ] : {
28- bottom : 0 ,
29- } ,
3025 } ) ,
3126 modifiers : {
27+ pickVariant : {
28+ bottom : {
29+ [ `&:hover ${ AvatarHandleTag } ` ] : {
30+ bottom : '0' ,
31+ } ,
32+ } ,
33+ fullWidth : {
34+ [ `&:hover > ${ AvatarHandleFullWidthTag } ` ] : {
35+ background : 'rgba(50, 60, 71, 0.7);' ,
36+
37+ [ `${ AvatarHandleIconContainerTag } ` ] : {
38+ opacity : 1 ,
39+ } ,
40+ } ,
41+ } ,
42+ } ,
43+ variant : {
44+ circle : {
45+ borderRadius : '100%' ,
46+ } ,
47+ square : {
48+ borderRadius : '0%' ,
49+ } ,
50+ rounded : {
51+ borderRadius : '17%' ,
52+ } ,
53+ } ,
3254 size : {
3355 xs : {
3456 width : '16px' ,
@@ -55,6 +77,11 @@ const [AvatarTag, themeAvatar] = createThemeTag(name, ({ COLORS }: *) => ({
5577 height : '100px' ,
5678 fontSize : '32px' ,
5779 } ,
80+ xxl : {
81+ width : '120px' ,
82+ height : '120px' ,
83+ fontSize : '48px' ,
84+ } ,
5885 stretch : {
5986 width : '100%' ,
6087 height : '100%' ,
@@ -85,6 +112,86 @@ const [AvatarHandleTag, themeHandle] = createThemeTag(`${name}Handle`, ({ COLORS
85112 } ,
86113} ) ) ;
87114
115+ const [ AvatarHandleFullWidthTag , themeHandleFullWidth ] = createThemeTag ( `${ name } HandleFullWidth` , ( { COLORS } : * ) => ( {
116+ root : {
117+ position : 'absolute' ,
118+ top : '0' ,
119+ left : '0' ,
120+ right : '0' ,
121+ height : '100%' ,
122+ cursor : 'pointer' ,
123+
124+ display : 'flex' ,
125+ justifyContent : 'center' ,
126+ alignItems : 'center' ,
127+ textAlign : 'center' ,
128+
129+ background : 'rgba(50, 60, 71, 0)' ,
130+ fontSize : '8px' ,
131+ transition : 'all .15s ease-in-out' ,
132+ userSelect : 'none' ,
133+ color : COLORS . WHITE ,
134+ } ,
135+ modifiers : {
136+ variant : {
137+ circle : {
138+ borderRadius : '100%' ,
139+ } ,
140+ square : {
141+ borderRadius : '0%' ,
142+ } ,
143+ rounded : {
144+ borderRadius : '17%' ,
145+ } ,
146+ } ,
147+ } ,
148+ } ) ) ;
149+
150+ const [ AvatarHandleIconContainerTag , themeHandleIconContainer ] = createThemeTag ( `${ name } HandleIconContainer` , ( { COLORS } : * ) => ( {
151+ root : {
152+ color : COLORS . WHITE ,
153+ display : 'flex' ,
154+ flexFlow : 'column' ,
155+ alignItems : 'center' ,
156+
157+ '> div:nth-child(2)' : {
158+ paddingTop : '2px' ,
159+ position : 'relative' ,
160+ top : '1px' ,
161+ } ,
162+ opacity : 0 ,
163+ } ,
164+ modifiers : {
165+ size : {
166+ xs : {
167+ '> div:nth-child(2)' : {
168+ display : 'none' ,
169+ } ,
170+ } ,
171+ sm : {
172+ '> div:nth-child(2)' : {
173+ display : 'none' ,
174+ } ,
175+ } ,
176+ md : {
177+ fontSize : '6px' ,
178+ } ,
179+ lg : {
180+ fontSize : '12px' ,
181+ } ,
182+ xl : {
183+ fontSize : '14px' ,
184+ } ,
185+ xxl : {
186+ fontSize : '14px' ,
187+ } ,
188+ stretch : {
189+ fontSize : '2rem' ,
190+ } ,
191+ } ,
192+ } ,
193+ } ) ) ;
194+
88195const [ AvatarImgTag , themeAvatarImg ] = createThemeTag ( `${ name } Img` , {
89196 root : {
90197 width : '100%' ,
@@ -97,6 +204,8 @@ const theme = {
97204 ...themeHandle ,
98205 ...themeAvatar ,
99206 ...themeAvatarImg ,
207+ ...themeHandleFullWidth ,
208+ ...themeHandleIconContainer ,
100209} ;
101210
102- export { theme , AvatarImgTag , AvatarTag , AvatarHandleTag } ;
211+ export { theme , AvatarImgTag , AvatarTag , AvatarHandleTag , AvatarHandleFullWidthTag , themeHandleFullWidth , AvatarHandleIconContainerTag } ;
0 commit comments