+
+ {SIZE_VALUES.map((size) => (
+ }
+ ariaLabel={`Circle ${size}`}
+ tooltipLabel={`Circle ${size}`}
+ />
+ ))}
+
+
+ {SIZE_VALUES.map((size) => (
+ }
+ ariaLabel={`Squared ${size}`}
+ tooltipLabel={`Squared ${size}`}
+ />
+ ))}
+
+
+ ),
+};
+
/** Shows the button in its disabled state. */
export const Disabled: Story = {
args: {
diff --git a/src/components/Button/constants.ts b/src/components/Button/constants.ts
index 22517be..5df5521 100644
--- a/src/components/Button/constants.ts
+++ b/src/components/Button/constants.ts
@@ -15,7 +15,9 @@ import {
colorGray,
colorBrandAux,
} from '../../stylesheets/palette';
-import { spacingMedium, spacingSmall, spacingSmallMedium } from '../../stylesheets/sizing';
+import {
+ spacingSmall, spacingSmallMedium, spacingMedium, spacingXLarge, spacingXXLarge,
+} from '../../stylesheets/sizing';
import { CSSColorPropertiesType, CSSSizePropertiesType, EssentialColorProperties } from './type';
const VARIANTS = {
@@ -193,9 +195,11 @@ const CSS_COLOR_PROPERTIES_DISABLED: EssentialColorProperties = {
const CSS_SIZE_PROPERTIES: CSSSizePropertiesType = {
sm: {
padding: `${spacingSmall} ${spacingSmallMedium}`,
+ iconBoxSize: spacingXLarge,
},
md: {
- padding: spacingMedium
+ padding: spacingMedium,
+ iconBoxSize: spacingXXLarge,
},
};
diff --git a/src/components/Button/styles.ts b/src/components/Button/styles.ts
index d384e80..b44c596 100644
--- a/src/components/Button/styles.ts
+++ b/src/components/Button/styles.ts
@@ -119,10 +119,15 @@ const stackedLayoutStyles = css`
align-items: center;
`;
-const circleLayoutStyles = css`
- border-radius: 50%;
- width: 3rem;
- height: 3rem;
+// Shared by `circle` and `squared`: both are icon-only, fixed-box layouts that
+// must render at the same width/height for a given `size` — they differ only
+// in border-radius (round vs. slightly rounded square).
+const iconOnlyBoxStyles = css