-
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.
feat(headercolor): add HeaderColor plugin
- Loading branch information
John Luke
committed
Nov 23, 2016
1 parent
0660a3b
commit 93696d5
Showing
2 changed files
with
41 additions
and
0 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
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 |
---|---|---|
@@ -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; } | ||
|
||
} |