UNPKG

894 BTypeScriptView Raw
1/**
2 * @name Pin Dialog
3 * @description
4 *
5 * @usage
6 * ```typescript
7 * import { PinDialog } from 'ionic-native';
8 *
9 *
10 * PinDialog.prompt('Enter your PIN', 'Verify PIN', ['OK', 'Cancel'])
11 * .then(
12 * (result: any) => {
13 * if (result.buttonIndex == 1) console.log('User clicked OK, value is: ', result.input1);
14 * else if(result.buttonIndex == 2) console.log('User cancelled');
15 * }
16 * );
17 * ```
18 */
19export declare class PinDialog {
20 /**
21 * Show pin dialog
22 * @param {string} message Message to show the user
23 * @param {string} title Title of the dialog
24 * @param {string[]} buttons Buttons to show
25 * @returns {Promise<{ buttonIndex: number, input1: string }>}
26 */
27 static prompt(message: string, title: string, buttons: string[]): Promise<{
28 buttonIndex: number;
29 input1: string;
30 }>;
31}