mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Include inputOptions for bootbox.prompt
This commit is contained in:
committed by
Stanny Nuytkens
parent
2cabef6efe
commit
e990bd3aeb
@@ -38,7 +38,29 @@ bootbox.prompt({
|
||||
console.log(result);
|
||||
}
|
||||
});
|
||||
|
||||
bootbox.prompt({
|
||||
title: "This is a prompt with a set of checkbox inputs!",
|
||||
inputType: 'checkbox',
|
||||
inputOptions: [
|
||||
{
|
||||
text: 'Choice One',
|
||||
value: '1',
|
||||
group: 'Group 1'
|
||||
},
|
||||
{
|
||||
text: 'Choice Two',
|
||||
value: '2',
|
||||
group: 'Group 1'
|
||||
},
|
||||
{
|
||||
text: 'Choice Three',
|
||||
value: '3'
|
||||
}
|
||||
],
|
||||
callback: function (result) {
|
||||
console.log(result);
|
||||
}
|
||||
});
|
||||
|
||||
bootbox.dialog({
|
||||
title: "Wassup?",
|
||||
|
||||
Vendored
+2
-1
@@ -1,6 +1,6 @@
|
||||
// Type definitions for Bootbox 4.4.0
|
||||
// Project: https://github.com/makeusabrew/bootbox
|
||||
// Definitions by: Vincent Bortone <https://github.com/vbortone/>, Kon Pik <https://github.com/konpikwastaken/>, Anup Kattel <https://github.com/kanup/>, Dominik Schroeter <https://github.com/icereed/>, Troy McKinnon <https://github.com/trodi/>
|
||||
// Definitions by: Vincent Bortone <https://github.com/vbortone/>, Kon Pik <https://github.com/konpikwastaken/>, Anup Kattel <https://github.com/kanup/>, Dominik Schroeter <https://github.com/icereed/>, Troy McKinnon <https://github.com/trodi/>, Stanny Nuytkens <https://github.com/stannynuytkens>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference types="jquery" />
|
||||
@@ -44,6 +44,7 @@ interface BootboxPromptOptions extends BootboxBaseOptions {
|
||||
inputType?: "text" | "textarea" | "email" | "select" | "checkbox" | "date" | "time" | "number" | "password";
|
||||
callback: (result: string) => any;
|
||||
buttons?: BootboxConfirmPromptButtonMap;
|
||||
inputOptions?: { text: string, value: string, group?: string }[];
|
||||
}
|
||||
|
||||
/** Bootbox options available when setting defaults for modals */
|
||||
|
||||
Reference in New Issue
Block a user