ConfirmOrCancelButtons
Last chance to make the right decision.
Example
Props
đšī¸ standard props
loading boolean
Indicates if the confirm button is in a loading state.
falsemarginTop size
Top margin of the button container.
20pxcancelText string
Text of the cancel button.
AnnullaconfirmText string
Text of the confirm button.
SalvaconfirmDisable boolean
Disables the confirm button.
falsecancelDisable boolean
Disables the cancel button.
falseđ¨ style props
Slots
cancelButtonSnippet
Slot for custom cancel button.
Default content:
<button
class="text-button"
onclick={handleCancel}
>{cancelText}</button>
Available variables:
| Name | Type | Description |
|---|---|---|
loading | boolean | Loading state. |
handleCancel | function | Cancel handler. |
cancelText | string | Cancel button text. |
confirmButtonSnippet
Slot for custom confirm button.
Default content:
<Button
loading={loading}
onclick={handleConfirm}
disabled={confirmDisable}
>{confirmText}</Button>
Available variables:
| Name | Type | Description |
|---|---|---|
loading | boolean | Loading state. |
handleConfirm | function | Confirm handler. |
confirmText | string | Confirm button text. |
confirmDisable | boolean | Confirm button disabled state. |
Events
onconfirmClick
Triggered when the confirm button is clicked.
| Attribute | Type | Description |
|---|---|---|
| nativeEvent | MouseEvent | The native click event. |
oncancelClick
Triggered when the cancel button is clicked.
| Attribute | Type | Description |
|---|---|---|
| nativeEvent | MouseEvent | KeyboardEvent | The native click or keyboard event. |