awesome-cordova-plugins/dist/plugins/actionsheet.d.ts

35 lines
1.2 KiB
TypeScript
Raw Normal View History

2016-02-08 06:12:13 +08:00
/**
* The ActionSheet plugin shows a native list of options the user can choose from.
*/
2015-11-30 06:30:15 +08:00
export declare class ActionSheet {
2016-02-06 09:22:23 +08:00
/**
* Show the ActionSheet.
* @param {options}
* Available options:
* buttonLabels: string[]
* title: string
* androidTheme (Android only): number 1-5
* androidEnableCancelButton (Android only): boolean, default false
* winphoneEnableCancelButton (WP only): boolean, default false
* addCancelButtonWithLabel: string
* addDestructiveButtonWithLabel: string
* position: [x, y] (iPad pass in [x, y] coords of popover)
2016-02-08 06:12:13 +08:00
* @returns {Promise} returns a promise that resolves with the index of the
* button pressed (1 based, so 1, 2, 3, etc.)
2016-02-06 09:22:23 +08:00
*/
static show(options?: {
buttonLabels: string[];
title?: string;
androidTheme?: number;
androidEnableCancelButton?: boolean;
winphoneEnableCancelButton?: boolean;
addCancelButtonWithLabel?: string;
addDestructiveButtonWithLabel?: string;
position?: number[];
}): Promise<any>;
/**
* Hide the ActionSheet.
*/
2016-02-08 06:12:13 +08:00
static hide(): Promise<any>;
2015-11-30 06:30:15 +08:00
}