UNPKG

2.51 kBTypeScriptView Raw
1import { IonicNativePlugin } from '@ionic-native/core';
2/**
3 * @name Status Bar
4 * @premier statusbar
5 * @capacitorincompatible true
6 * @description
7 * Manage the appearance of the native status bar.
8 *
9 * Requires Cordova plugin: `cordova-plugin-statusbar`. For more info, please see the [StatusBar plugin docs](https://github.com/apache/cordova-plugin-statusbar).
10 *
11 * @usage
12 * ```typescript
13 * import { StatusBar } from '@ionic-native/status-bar/ngx';
14 *
15 * constructor(private statusBar: StatusBar) { }
16 *
17 * ...
18 *
19 * // let status bar overlay webview
20 * this.statusBar.overlaysWebView(true);
21 *
22 * // set status bar to white
23 * this.statusBar.backgroundColorByHexString('#ffffff');
24 * ```
25 *
26 */
27export declare class StatusBarOriginal extends IonicNativePlugin {
28 /**
29 * Whether the StatusBar is currently visible or not.
30 */
31 isVisible: boolean;
32 /**
33 * Set whether the status bar overlays the main app view. The default
34 * is true.
35 *
36 * @param {boolean} doesOverlay Whether the status bar overlays the main app view.
37 */
38 overlaysWebView(doesOverlay: boolean): void;
39 /**
40 * Use the default statusbar (dark text, for light backgrounds).
41 */
42 styleDefault(): void;
43 /**
44 * Use the lightContent statusbar (light text, for dark backgrounds).
45 */
46 styleLightContent(): void;
47 /**
48 * Use the blackTranslucent statusbar (light text, for dark backgrounds).
49 */
50 styleBlackTranslucent(): void;
51 /**
52 * Use the blackOpaque statusbar (light text, for dark backgrounds).
53 */
54 styleBlackOpaque(): void;
55 /**
56 * Set the status bar to a specific named color. Valid options:
57 * black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown.
58 *
59 * iOS note: you must call StatusBar.overlaysWebView(false) to enable color changing.
60 *
61 * @param {string} colorName The name of the color (from above)
62 */
63 backgroundColorByName(colorName: string): void;
64 /**
65 * Set the status bar to a specific hex color (CSS shorthand supported!).
66 *
67 * iOS note: you must call StatusBar.overlaysWebView(false) to enable color changing.
68 *
69 * @param {string} hexString The hex value of the color.
70 */
71 backgroundColorByHexString(hexString: string): void;
72 /**
73 * Hide the StatusBar
74 */
75 hide(): void;
76 /**
77 * Show the StatusBar
78 */
79 show(): void;
80}
81
82export declare const StatusBar: StatusBarOriginal;
\No newline at end of file