add c ancel button for confirm alert (#407)

* add c ancel button for confirm alert

* Refactor the No alertConfirm button

---------

Co-authored-by: Julien Nahum <julien@nahum.net>
This commit is contained in:
Favour Olayinka
2024-05-13 13:33:23 +01:00
committed by GitHub
parent b4a5843de6
commit 6a18615a84

View File

@@ -48,7 +48,7 @@ export function useAlert () {
timeout: autoClose, timeout: autoClose,
actions: [ actions: [
{ label: options.successLabel ?? 'Yes', click: onSuccess }, { label: options.successLabel ?? 'Yes', click: onSuccess },
...(onFailure ? [{ label: options.failureLabel ?? 'No', click: onFailure }] : []) { label: options.failureLabel ?? 'No', click: onFailure }
], ],
...options ...options
}) })