awesome-cordova-plugins/src/plugins/statusbar.ts
Tim Lancina 5ad72de3d3 chore(): remove unnecessary name option from Plugin decorator
At least for now, we get the name of the plugin from the class.
2016-03-04 14:04:43 -06:00

109 lines
2.4 KiB
TypeScript

import {Plugin, Cordova, CordovaProperty} from './plugin';
declare var window;
/**
*
* Manage the appearance of the native status bar.
*
* Requires Cordova plugin: `cordova-plugin-statusbar`. For more info, please see the [StatusBar plugin docs](https://github.com/apache/cordova-plugin-statusbar).
*/
@Plugin({
plugin: 'cordova-plugin-statusbar',
pluginRef: 'StatusBar',
repo: 'https://github.com/apache/cordova-plugin-statusbar'
})
export class StatusBar {
/**
* Set whether the status bar overlays the main app view. The default
* is true.
*
* @param {boolean} doesOverlay Whether the status bar overlays the main app view.
*/
@Cordova({
sync: true
})
static overlaysWebView(doesOverlay: boolean){};
/**
* Use the default statusbar (dark text, for light backgrounds).
*/
@Cordova({
sync: true
})
static styleDefault(){};
/**
* Use the lightContent statusbar (light text, for dark backgrounds).
*/
@Cordova({
sync: true
})
static styleLightContent(){};
/**
* Use the blackTranslucent statusbar (light text, for dark backgrounds).
*/
@Cordova({
sync: true
})
static styleBlackTranslucent(){};
/**
* Use the blackOpaque statusbar (light text, for dark backgrounds).
*/
@Cordova({
sync: true
})
static styleBlackOpaque(){};
/**
* Set the status bar to a specific named color. Valid options:
* black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown.
*
* iOS note: you must call StatusBar.setOverlay(false) to enable color changing.
*
* @param {string} colorName The name of the color (from above)
*/
@Cordova({
sync: true
})
static backgroundColorByName(colorName: string){};
/**
* Set the status bar to a specific hex color (CSS shorthand supported!).
*
* iOS note: you must call StatusBar.setOverlay(false) to enable color changing.
*
* @param {string} hexString The hex value of the color.
*/
@Cordova({
sync: true
})
static backgroundColorByHexString(hexString: string){};
/**
* Hide the StatusBar
*/
@Cordova({
sync: true
})
static hide(){};
/**
* Show the StatusBar
*/
@Cordova({
sync: true
})
static show(){};
/**
* Whether the StatusBar is currently visible or not.
*/
@CordovaProperty
static get isVisible() {
return window.StatusBar.isVisible;
}
}