Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

Fix grouped button press spacing (#2365)

Andrey Goder5854b4c4af89
diff --git a/packages/core/src/Button/XDSButton.tsx b/packages/core/src/Button/XDSButton.tsx
index 351c421f0e..d6f8c0bb7d 100644
--- a/packages/core/src/Button/XDSButton.tsx
+++ b/packages/core/src/Button/XDSButton.tsx
@@ -73,6 +73,8 @@ const styles = stylex.create({
'@media (prefers-reduced-motion: reduce)': '0s',
},
transitionTimingFunction: easeVars['--ease-standard'],
+ },
+ pressable: {
transform: {
default: 'scale(1)',
':active': 'scale(0.98)',
@@ -572,6 +574,7 @@ export function XDSButton({
useAriaDisabled && styles.ariaDisabled,
isLoadingState && loadingStyles.loading,
renderAsLink && styles.link,
+ !buttonGroup && styles.pressable,
buttonGroup &&
(buttonGroup.orientation === 'horizontal'
? groupStyles.horizontal