Added type definitions for 'mode' to TimePickerAndroidOpenOptions

This commit is contained in:
Martin van Dam
2018-08-20 09:28:03 +02:00
parent ee84ef5f4f
commit 3d143304e8
+6
View File
@@ -11,6 +11,7 @@
// Michele Bombardi <https://github.com/bm-software>
// Tanguy Krotoff <https://github.com/tkrotoff>
// Alexander T. <https://github.com/a-tarasyuk>
// Martin van Dam <https://github.com/mvdam>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
@@ -7867,6 +7868,7 @@ type TimePickerAndroidOpenOptions = {
hour?: number;
minute?: number;
is24Hour?: boolean;
mode?: 'clock' | 'spinner' | 'default';
};
/**
@@ -7899,6 +7901,10 @@ export interface TimePickerAndroidStatic {
* * `is24Hour` (boolean) - If `true`, the picker uses the 24-hour format. If `false`,
* the picker shows an AM/PM chooser. If undefined, the default for the current locale
* is used.
* * `mode` (enum('clock', 'spinner', 'default')) - set the time picker mode
* * 'clock': Show a time picker in clock mode.
* * 'spinner': Show a time picker in spinner mode.
* * 'default': Show a default time picker based on Android versions.
*
* Returns a Promise which will be invoked an object containing `action`, `hour` (0-23),
* `minute` (0-59) if the user picked a time. If the user dismissed the dialog, the Promise will