-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(spinnerdialog): fix functionality
- Loading branch information
Showing
1 changed file
with
37 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,53 @@ | ||
import {Plugin, Cordova} from './plugin'; | ||
|
||
/** | ||
* @name Spinner Dialog | ||
* @description | ||
* @usage | ||
* ```js | ||
* import {SpinnerDialog} from 'ionic-native'; | ||
* | ||
* | ||
* | ||
* SpinnerDialog.show(); | ||
* | ||
* SpinnerDialog.hide(); | ||
* ``` | ||
*/ | ||
@Plugin({ | ||
plugin: 'cordova-plugin-spinner-dialog', | ||
pluginRef: 'window.plugins.spinnerDialog', | ||
repo: 'https://github.com/Paldom/SpinnerDialog', | ||
platforms: ['Android','iOS','Windows Phone 8'] | ||
}) | ||
export class SpinnerDialog { | ||
|
||
@Cordova() | ||
static show(title : string, message : string) : Promise<any> {return} | ||
|
||
/** | ||
* Shows the spinner dialog | ||
* @param title {string} Spinner title (shows on Android only) | ||
* @param message {string} Spinner message | ||
* @param cancelCallback {boolean|function} Set to false to set spinner not cancelable. Or provide a function to call when the user cancels the spinner. | ||
* @param iOSOptions {object} Options for iOS only | ||
*/ | ||
@Cordova({ | ||
sync: true | ||
}) | ||
static show(title? : string, message? : string, cancelCallback? : any, iOSOptions? : SpinnerDialogIOSOptions) : void {} | ||
|
||
/** | ||
* Hides the spinner dialog if visible | ||
*/ | ||
@Cordova({ | ||
sync: true | ||
}) | ||
static hide() : void {} | ||
|
||
} | ||
|
||
export interface SpinnerDialogIOSOptions { | ||
overlayOpacity? : number, | ||
textColorRed? : number, | ||
textColorGreen? : number, | ||
textColorBlue? : number | ||
} |