gantri-components 2.239.0 → 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 +5 -1
- package/dist/components/button/button.types.d.ts +8 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/package.json +1 -1
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**:
|
|
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;
|