gantri-components 2.239.1 → 2.240.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CLAUDE.md CHANGED
@@ -174,7 +174,11 @@ const StyledBox = styled.div<StyledBoxProps>`
174
174
  | ~56-64px | `large` |
175
175
  | ~80px | `extraLarge` |
176
176
 
177
- **Icon-only**: If the button is a perfect circle with just an icon (no text), pass `icon` without `text`.
177
+ **Icon-only**: A button with `icon` and no `text` renders as a normal pill-shaped button with the icon centered. To make it a perfect circle, opt in with the `rounded` prop:
178
+ ```tsx
179
+ <Button icon={<Icon name="ui-control:x" />} rounded variant="ghost" />
180
+ ```
181
+ Without `rounded`, the button stays the normal shape — `iconLocation` is silently ignored when there is no text.
178
182
 
179
183
  - Modern themes: pill shape (40px radius), inner glow, no border
180
184
  - Classic themes: square corners (theme.borderRadius), solid borders
@@ -23,6 +23,14 @@ export interface ButtonProps extends Pick<BaseProps, Exclude<keyof BaseProps, 'c
23
23
  minWidth?: ResolutionAwareProp<Property.Width>;
24
24
  onClick?: (event: MouseEvent) => void;
25
25
  processing?: boolean;
26
+ /**
27
+ * Render the button as a circle. Only meaningful for icon-only buttons
28
+ * (no text). When `true` AND there is no text, the button becomes a
29
+ * perfect circle (aspect-ratio: 1, border-radius: 50%). When `false`
30
+ * (default), an icon-only button stays the normal pill/rectangle shape
31
+ * with the icon centered.
32
+ */
33
+ rounded?: boolean;
26
34
  size?: ResolutionAwareProp<ButtonSize>;
27
35
  text?: string;
28
36
  textLineHeight?: Property.LineHeight;