diff --git a/bootbox/bootbox-tests.ts b/bootbox/bootbox-tests.ts index b5f32931ae..f5604d5312 100644 --- a/bootbox/bootbox-tests.ts +++ b/bootbox/bootbox-tests.ts @@ -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?", diff --git a/bootbox/index.d.ts b/bootbox/index.d.ts index d5ceb5ef62..28d30e2ba0 100644 --- a/bootbox/index.d.ts +++ b/bootbox/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for Bootbox 4.4.0 // Project: https://github.com/makeusabrew/bootbox -// Definitions by: Vincent Bortone , Kon Pik , Anup Kattel , Dominik Schroeter , Troy McKinnon +// Definitions by: Vincent Bortone , Kon Pik , Anup Kattel , Dominik Schroeter , Troy McKinnon , Stanny Nuytkens // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// @@ -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 */