From 274fa06330ec8367f788dab7f71c655a09ac8971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aar=C3=B3n=20Garc=C3=ADa=20Herv=C3=A1s?= Date: Fri, 25 Oct 2024 08:03:12 +0200 Subject: [PATCH 1/2] Fix AvatarGroup spacing --- packages/mui-material/src/AvatarGroup/AvatarGroup.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/mui-material/src/AvatarGroup/AvatarGroup.js b/packages/mui-material/src/AvatarGroup/AvatarGroup.js index bdb69662b3162c..91a2b1ca4a9b57 100644 --- a/packages/mui-material/src/AvatarGroup/AvatarGroup.js +++ b/packages/mui-material/src/AvatarGroup/AvatarGroup.js @@ -130,10 +130,6 @@ const AvatarGroup = React.forwardRef(function AvatarGroup(inProps, ref) { ownerState, additionalProps: { variant, - style: { - '--AvatarGroup-spacing': marginValue ? `${marginValue}px` : undefined, - ...other.style, - }, }, }); @@ -142,6 +138,10 @@ const AvatarGroup = React.forwardRef(function AvatarGroup(inProps, ref) { as={component} ownerState={ownerState} className={clsx(classes.root, className)} + style={{ + '--AvatarGroup-spacing': marginValue ? `${marginValue}px` : undefined, + ...other.style, + }} ref={ref} {...other} > From 64fceb6239ec441e32453895697bcb3fd10c0b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aar=C3=B3n=20Garc=C3=ADa=20Herv=C3=A1s?= Date: Mon, 28 Oct 2024 10:44:53 +0100 Subject: [PATCH 2/2] Fix prop spread order --- packages/mui-material/src/AvatarGroup/AvatarGroup.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mui-material/src/AvatarGroup/AvatarGroup.js b/packages/mui-material/src/AvatarGroup/AvatarGroup.js index 91a2b1ca4a9b57..b6418743544af2 100644 --- a/packages/mui-material/src/AvatarGroup/AvatarGroup.js +++ b/packages/mui-material/src/AvatarGroup/AvatarGroup.js @@ -138,12 +138,12 @@ const AvatarGroup = React.forwardRef(function AvatarGroup(inProps, ref) { as={component} ownerState={ownerState} className={clsx(classes.root, className)} + ref={ref} + {...other} style={{ '--AvatarGroup-spacing': marginValue ? `${marginValue}px` : undefined, ...other.style, }} - ref={ref} - {...other} > {extraAvatars ? {extraAvatarsElement} : null} {children