@@ -234,7 +234,7 @@ export const ConnectWalletSocialOptions = (
234
234
props . select ( ) ;
235
235
}
236
236
237
- const showOnlyIcons = socialLogins . length > 1 ;
237
+ const showOnlyIcons = socialLogins . length > 2 ;
238
238
239
239
return (
240
240
< Container
@@ -247,22 +247,33 @@ export const ConnectWalletSocialOptions = (
247
247
{ /* Social Login */ }
248
248
{ hasSocialLogins && (
249
249
< Container
250
- flex = { showOnlyIcons ? "row" : "column" }
250
+ flex = "row"
251
251
center = "x"
252
- gap = " sm"
252
+ gap = { socialLogins . length > 4 ? "xs" : " sm"}
253
253
style = { {
254
254
justifyContent : "space-between" ,
255
+ display : "grid" ,
256
+ gridTemplateColumns : `repeat(${ socialLogins . length } , 1fr)` ,
255
257
} }
256
258
>
257
259
{ socialLogins . map ( ( loginMethod ) => {
258
- const imgIconSize = showOnlyIcons ? iconSize . lg : iconSize . md ;
260
+ const imgIconSize = ( ( ) => {
261
+ if ( ! showOnlyIcons ) {
262
+ return iconSize . md ;
263
+ } else {
264
+ if ( socialLogins . length > 4 ) {
265
+ return iconSize . md ;
266
+ }
267
+ return iconSize . lg ;
268
+ }
269
+ } ) ( ) ;
270
+
259
271
return (
260
272
< SocialButton
261
273
aria-label = { `Login with ${ loginMethod } ` }
262
274
data-variant = { showOnlyIcons ? "icon" : "full" }
263
275
key = { loginMethod }
264
276
variant = { "outline" }
265
- fullWidth = { ! showOnlyIcons }
266
277
onClick = { ( ) => {
267
278
handleSocialLogin ( loginMethod as SocialAuthOption ) ;
268
279
} }
@@ -274,7 +285,7 @@ export const ConnectWalletSocialOptions = (
274
285
client = { props . client }
275
286
/>
276
287
{ ! showOnlyIcons &&
277
- loginMethodsLabel [ loginMethod as SocialAuthOption ] }
288
+ ` ${ socialLogins . length === 1 ? "Continue with " : "" } ${ loginMethodsLabel [ loginMethod as SocialAuthOption ] } ` }
278
289
</ SocialButton >
279
290
) ;
280
291
} ) }
@@ -379,11 +390,12 @@ export const ConnectWalletSocialOptions = (
379
390
} ;
380
391
381
392
const SocialButton = /* @__PURE__ */ styled ( Button ) ( {
393
+ flexGrow : 1 ,
382
394
"&[data-variant='full']" : {
383
395
display : "flex" ,
384
396
justifyContent : "flex-start" ,
385
397
padding : spacing . md ,
386
- gap : spacing . md ,
398
+ gap : spacing . sm ,
387
399
fontSize : fontSize . md ,
388
400
fontWeight : 500 ,
389
401
transition : "background-color 0.2s ease" ,
@@ -393,6 +405,5 @@ const SocialButton = /* @__PURE__ */ styled(Button)({
393
405
} ,
394
406
"&[data-variant='icon']" : {
395
407
padding : spacing . sm ,
396
- flexGrow : 1 ,
397
408
} ,
398
409
} ) ;
0 commit comments