@@ -238,6 +238,15 @@ export const btnStyles = style<ButtonRenderProps & ActionButtonStyleProps & Togg
238
238
paddingX : {
239
239
default : controlStyle . paddingX ,
240
240
[ avatarOnly ] : 0
241
+ } ,
242
+ // `control` sets this, but we need to override it for avatar only buttons.
243
+ '--iconMargin' : {
244
+ type : 'marginStart' ,
245
+ value : {
246
+ default : fontRelative ( - 2 ) ,
247
+ [ iconOnly ] : 0 ,
248
+ [ avatarOnly ] : 0
249
+ }
241
250
}
242
251
} , getAllowedOverrides ( ) ) ;
243
252
@@ -325,10 +334,7 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
325
334
[ AvatarContext , {
326
335
size : avatarSize [ size ] ,
327
336
styles : style ( {
328
- marginStart : {
329
- default : '--iconMargin' ,
330
- ':last-child' : 0
331
- } ,
337
+ marginStart : '--iconMargin' ,
332
338
flexShrink : 0 ,
333
339
order : 0
334
340
} )
@@ -345,7 +351,17 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
345
351
staticColor : staticColor ,
346
352
size : props . size === 'XS' ? undefined : props . size ,
347
353
isDisabled : isDisabled ,
348
- styles : style ( { position : 'absolute' , top : '--badgeTop' , insetStart : '--badgePosition' , marginTop : 'calc((self(height) * -1)/2)' , marginStart : 'calc((self(height) * -1)/2)' } )
354
+ styles : style ( {
355
+ position : 'absolute' ,
356
+ top : '--badgeTop' ,
357
+ insetStart : '--badgePosition' ,
358
+ marginTop : 'calc((self(height) * -1)/2)' ,
359
+ marginStart : 'calc((self(height) * -1)/2)' ,
360
+ opacity : {
361
+ default : 1 ,
362
+ isProgressVisible : 0
363
+ }
364
+ } ) ( { isProgressVisible} )
349
365
} ]
350
366
] } >
351
367
{ typeof props . children === 'string' ? < Text > { props . children } </ Text > : props . children }
@@ -369,6 +385,7 @@ export const ActionButton = forwardRef(function ActionButton(props: ActionButton
369
385
styles = { style ( {
370
386
size : {
371
387
size : {
388
+ XS : 12 ,
372
389
S : 14 ,
373
390
M : 18 ,
374
391
L : 20 ,
0 commit comments