You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The component uses a native `<button>` element, so it inherits browser keyboard accessibility (space/enter) and form behavior; consumers should be aware of the native `type` default behavior in forms and add an explicit `type` attribute where necessary to avoid accidental form submits.
85
+
- Click events are NOT emitted when `isLoading` is true.
- The component uses a native `<button>` element, so it inherits browser keyboard accessibility (space/enter) and form behavior.
71
88
72
89
## Extension & Composition
73
90
74
91
- The component is intentionally simple and is designed for composition via the `slot` and surrounding layout.
75
-
- Accepts custom slot content for icons or complex inline labels (icon + text). The component does not provide a built-in `icon` prop; use the slot to place an icon element before or after the label.
76
-
- Works well inside `FormItem` or other containers. Because it is a native `button`, it behaves like a regular HTML button in forms.
92
+
- Accepts custom slot content for icons or complex inline labels (icon + text).
93
+
- Works well inside `FormItem` or other containers.
77
94
78
95
## Non-Goals
79
96
80
-
- There is no built-in `disabled` or `loading` prop. Disabling or preventing repeated action should be handled by parent components or by a wrapper that manages state.
81
97
- It does not provide variant-level keyboard shortcuts or automatic confirmation dialogs.
82
-
- It does not manage long-running workflows, API states, or request lifecycle (for example, showing an internal spinner when an action is in-flight).
98
+
- It does not manage long-running workflows, API states, or request lifecycle (it only provides the `isLoading` visual state).
- Emits: `click` (always true), implemented as a regular native `<button>` click event via `emit('click')`.
88
104
- The `slot` is present and should be considered the source of truth for custom content; the `text` prop is a convenience when only a label is used.
89
105
- Accessibility note for maintainers: the component omits an explicit `type` attribute on the underlying `<button>`, so by default in HTML forms the button will behave as `submit`. When used inside a form where submission is not intended, the caller should pass a `type="button"` attribute to avoid accidental form submits.
@@ -92,7 +108,10 @@ The `slot` is supported for custom content; this is how you add icons or non-tex
- The component uses a native `<button>` element, so it inherits browser keyboard accessibility (space/enter) and form behavior; consumers should be aware of the native `type` default behavior in forms and add an explicit `type` attribute where necessary to avoid accidental form submits.
83
+
- Click events are NOT emitted when `isLoading` is true.
- The component uses a native `<button>` element, so it inherits browser keyboard accessibility (space/enter) and form behavior.
69
86
70
87
## Extension & Composition
71
88
72
89
- The component is intentionally simple and is designed for composition via the `slot` and surrounding layout.
73
-
- Accepts custom slot content for icons or complex inline labels (icon + text). The component does not provide a built-in `icon` prop; use the slot to place an icon element before or after the label.
74
-
- Works well inside `FormItem` or other containers. Because it is a native `button`, it behaves like a regular HTML button in forms.
90
+
- Accepts custom slot content for icons or complex inline labels (icon + text).
91
+
- Works well inside `FormItem` or other containers.
75
92
76
93
## Non-Goals
77
94
78
-
- There is no built-in `disabled` or `loading` prop. Disabling or preventing repeated action should be handled by parent components or by a wrapper that manages state.
79
95
- It does not provide variant-level keyboard shortcuts or automatic confirmation dialogs.
80
-
- It does not manage long-running workflows, API states, or request lifecycle (for example, showing an internal spinner when an action is in-flight).
96
+
- It does not manage long-running workflows, API states, or request lifecycle (it only provides the `isLoading` visual state).
- Emits: `click` (always true), implemented as a regular native `<button>` click event via `emit('click')`.
86
102
- The `slot` is present and should be considered the source of truth for custom content; the `text` prop is a convenience when only a label is used.
87
103
- Accessibility note for maintainers: the component omits an explicit `type` attribute on the underlying `<button>`, so by default in HTML forms the button will behave as `submit`. When used inside a form where submission is not intended, the caller should pass a `type="button"` attribute to avoid accidental form submits.
0 commit comments