mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 08:43:01 +08:00

* feat(navigationbar): add NavigationBar plugin * fix(navigationbar) typo in chore * Implement changes requested * fix(): add return * fix(docs): remove callback parameter * Update navigationbar.ts
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
import { Cordova, Plugin } from './plugin';
|
||
|
||
|
||
/**
|
||
* @name NavigationBar
|
||
* @description
|
||
* The NavigationBar plugin can you to hide and auto hide the android navigation bar.
|
||
*
|
||
* @usage
|
||
* ```typescript
|
||
* import { NavigationBar } from 'ionic-native';
|
||
*
|
||
* let autoHide: boolean = true;
|
||
* NavigationBar.hide(autoHide);
|
||
* ```
|
||
*/
|
||
@Plugin({
|
||
name: 'NavigationBar',
|
||
plugin: 'cordova-plugin-navigationbar',
|
||
pluginRef: 'navigationbar',
|
||
repo: 'https://github.com/cranberrygame/cordova-plugin-navigationbar',
|
||
platforms: ['Android']
|
||
})
|
||
export class NavigationBar {
|
||
|
||
/**
|
||
* hide automatically (or not) the navigation bar.
|
||
* @param autohide {boolean}
|
||
* @return {Promise<any>}
|
||
*/
|
||
@Cordova({
|
||
callbackStyle: 'object',
|
||
successName: 'success',
|
||
errorName: 'failure'
|
||
})
|
||
static setUp(autohide?: boolean = false): Promise<any> { return; }
|
||
|
||
/**
|
||
* Hide the navigation bar.
|
||
* @return {Promise<any>}
|
||
*/
|
||
@Cordova({
|
||
callbackStyle: 'object',
|
||
successName: 'success',
|
||
errorName: 'failure'
|
||
})
|
||
static hideNavigationBar(): Promise<any> { return; }
|
||
|
||
}
|