Skip to content

Commit

Permalink
[xprototype#4/fix] Use options to configure $message methods
Browse files Browse the repository at this point in the history
  • Loading branch information
wilcorrea committed Mar 29, 2019
1 parent 6a46053 commit e0c7bff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/boot/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@ const base = (options, action = {}) => {
* @param options
*/
export const toast = (message, options = {}) => {
Notify.create(base({ message }))
Notify.create(base({ message, ...options }))
}

/**
* @param {string} message
* @param options
*/
export const success = (message, options = {}) => {
Notify.create(base({ message, color: 'positive' }))
Notify.create(base({ message, ...options, color: 'positive' }))
}

/**
* @param {string} message
* @param options
*/
export const error = (message, options = {}) => {
Notify.create(base({ message, color: 'negative' }))
Notify.create(base({ message, ...options, color: 'negative' }))
}

/**
Expand Down

0 comments on commit e0c7bff

Please sign in to comment.