Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(headercolor): add HeaderColor plugin #821

Merged
merged 7 commits into from
Jan 20, 2017
Merged

feat(headercolor): add HeaderColor plugin #821

merged 7 commits into from
Jan 20, 2017

Conversation

jlucfarias
Copy link
Contributor

fix #760

* @param {Object} Optional callbacks
*/
@Cordova()
static tint(color: string, callbacks?: {success?: Function, failure?: Function}): void { }
Copy link
Collaborator

@ihadeed ihadeed Nov 29, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should return a Promise.

The decorator should include the following options:

@Cordova({
  callbackStyle: 'object',
  successName: 'success',
  errorName: 'failure'
})

Then finally remove the callbacks parameter.

@ihadeed ihadeed modified the milestone: v2.4.0 Nov 29, 2016
@jlucfarias
Copy link
Contributor Author

@ihadeed

successName: 'success',
errorName: 'failure'
})
static tint(color: string): Promise<any> { }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add return; between the curly brackets to avoid TS Errors.

/**
* Set a color to the task header
* @param color {string} The color 
*/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add @returns {Promise<any>}

@jlucfarias
Copy link
Contributor Author

@ihadeed

@Plugin({
name: 'HeaderColor',
plugin: 'cordova-plugin-headercolor',
pluginRef: 'headercolor',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be pluginRef: 'headerColor', ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just had a look

It should be plugins.headerColor

@Plugin({
name: 'HeaderColor',
plugin: 'cordova-plugin-headercolor',
pluginRef: 'headercolor',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just had a look

It should be plugins.headerColor

@ihadeed
Copy link
Collaborator

ihadeed commented Jan 19, 2017

@John-Luke changes look good, please see #821 (comment)

@ihadeed ihadeed merged commit 2e926f4 into danielsogl:master Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin to add: HeaderColor
3 participants