`;
-exports[`manager Check confirm with handle functions 1`] = `
+exports[`manager Check confirm with handler functions 1`] = `
diff --git a/test/__snapshots__/prompt.spec.js.snap b/test/__snapshots__/prompt.spec.js.snap
index 5da8a4c..a29042b 100644
--- a/test/__snapshots__/prompt.spec.js.snap
+++ b/test/__snapshots__/prompt.spec.js.snap
@@ -137,6 +137,7 @@ exports[`manager Prompt confirm 2`] = `
+
@@ -249,6 +250,7 @@ exports[`manager Prompt confirm 2`] = `
+
@@ -394,6 +396,7 @@ exports[`manager Test default prompt 2`] = `
+
diff --git a/test/confirm.spec.js b/test/confirm.spec.js
index dc82b18..56c5a5c 100644
--- a/test/confirm.spec.js
+++ b/test/confirm.spec.js
@@ -115,7 +115,7 @@ describe('manager', () => {
expect(document.body.innerHTML).toBe('')
})
- test('Check confirm with handle functions', async () => {
+ test('Check confirm with handler functions', async () => {
const dlg = await manager.confirm({
text: 'test',
actions: {
@@ -123,7 +123,7 @@ describe('manager', () => {
true: {
text: 'Yes',
class: 'action-true',
- handle: () => {
+ handler: () => {
return new Promise((resolve) => {
setTimeout(() => resolve({ msg: 'foo' }), 5)
})
diff --git a/types/index.d.ts b/types/index.d.ts
index fd52843..ac998b4 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -23,11 +23,13 @@ export interface DialogAction {
rounded? : boolean
disabled?: boolean
handle? (action: any): Promise
+ handler? (action: any): Promise
}
interface DialogActionable {
actions?: object | Array | Array
handle? (action: any): Promise
+ handler? (action: any): Promise
}
export interface DialogObject {
@@ -43,6 +45,14 @@ export interface DialogMessageOptions extends DialogActionable {
position?: string
timeout?: number
type?: string
+ outlined?: boolean
+ prominent?: boolean
+ dismissible?: boolean
+ flat?: boolean
+ centered?: boolean
+ border?: string
+ tile?: boolean
+ dense?: boolean
}
export interface DialogNotifyOptions extends DialogActionable {
@@ -54,6 +64,10 @@ export interface DialogNotifyOptions extends DialogActionable {
verticalOffset?: number
width?: number
zIndex?: number
+ flat?: boolean
+ rounded?: boolean
+ outlined?: boolean
+ shaped?: boolean
}
export interface DialogConfirmOptions extends DialogActionable {