Skip to content

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

TypeScript

docs(Button): add onClick and onClickAction to props table (#403)

Cindy Zhangb4abdccf760c
diff --git a/packages/core/src/Button/README.md b/packages/core/src/Button/README.md
index 55073b5317..26e4b5cfa0 100644
--- a/packages/core/src/Button/README.md
+++ b/packages/core/src/Button/README.md
@@ -69,6 +69,8 @@ or `<span onClick>` for accessibility (keyboard navigation, focus management, sc
| `children` | `ReactNode` | — | Button content |
| `endSlot` | `ReactElement<XDSIconProps> \| ReactElement<XDSBadgeProps>` | — | Trailing icon or badge after the label. Only accepts `<XDSIcon>` or `<XDSBadge>`. Ignored for icon-only. Color is inherited from the button variant. |
| `tooltip` | `string` | — | Tooltip text shown on hover |
+| `onClick` | `(e: MouseEvent) => void` | — | Standard click handler (passed through from `ButtonHTMLAttributes`) |
+| `onClickAction` | `(e: MouseEvent) => void \| Promise<void>` | — | Async click handler. Shows loading state while the returned promise is pending. |
## Files