-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Conversation
* @param {Object} Optional callbacks | ||
*/ | ||
@Cordova() | ||
static tint(color: string, callbacks?: {success?: Function, failure?: Function}): void { } |
There was a problem hiding this comment.
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.
successName: 'success', | ||
errorName: 'failure' | ||
}) | ||
static tint(color: string): Promise<any> { } |
There was a problem hiding this comment.
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 | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add @returns {Promise<any>}
@Plugin({ | ||
name: 'HeaderColor', | ||
plugin: 'cordova-plugin-headercolor', | ||
pluginRef: 'headercolor', |
There was a problem hiding this comment.
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',
?
There was a problem hiding this comment.
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', |
There was a problem hiding this comment.
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
@John-Luke changes look good, please see #821 (comment) |
fix #760