Skip to content

Commit

Permalink
feat(headercolor): add HeaderColor plugin
Browse files Browse the repository at this point in the history
fix [#760](#760)
  • Loading branch information
John Luke committed Nov 23, 2016
1 parent 0660a3b commit 93696d5
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ import { Globalization } from './plugins/globalization';
import { GooglePlus } from './plugins/google-plus';
import { GoogleMap } from './plugins/googlemaps';
import { GoogleAnalytics } from './plugins/googleanalytics';
import { HeaderColor } from './plugins/headercolor';
import { Hotspot } from './plugins/hotspot';
import { HTTP } from './plugins/http';
import { Httpd } from './plugins/httpd';
Expand Down Expand Up @@ -162,6 +163,7 @@ export * from './plugins/globalization';
export * from './plugins/google-plus';
export * from './plugins/googleanalytics';
export * from './plugins/googlemaps';
export * from './plugins/headercolor';
export * from './plugins/hotspot';
export * from './plugins/http';
export * from './plugins/httpd';
Expand Down Expand Up @@ -272,6 +274,7 @@ window['IonicNative'] = {
GooglePlus,
GoogleMap,
GoogleAnalytics,
HeaderColor,
Hotspot,
HTTP,
Httpd,
Expand Down
38 changes: 38 additions & 0 deletions src/plugins/headercolor.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { Plugin, Cordova } from './plugin';

/**
* @name Headerolor
* @description
* Cordova plugin to change color of header in multitask view
*
* @usage
* ```typescript
* import { HeaderColor } from 'ionic-native';
*
* HeaderColor.tint("#becb29").then(
* (success) => {
* console.log("Your header have a color now")
* },
* (error) => {
* console.log("Your header not have a color now")
* }
* ```
*/
@Plugin({
name: 'HeaderColor',
plugin: 'cordova-plugin-headercolor',
pluginRef: 'headercolor',
repo: 'https://github.com/tomloprod/cordova-plugin-headercolor',
platforms: ['Android']
})
export class HeaderColor {

/**
* Set a color to the task header
* @param color {string} The color
* @return {Promise<any>}
*/
@Cordova()
static tint(color: string): Promise<any> { return; }

}

0 comments on commit 93696d5

Please sign in to comment.