Suppress-able broadcasts

This commit is contained in:
James Barnsley
2017-05-29 16:29:49 +12:00
parent 7ed321b95f
commit 9a2c411e14
10 changed files with 125 additions and 33 deletions

View File

@ -244,13 +244,18 @@ export function createBrowserNotification( data ){
}
}
export function createNotification(content, type = 'default', key = helpers.generateGuid()){
export function createNotification(content, type = 'default', key = null, title = null, sticky = false){
if (!key){
key = helpers.generateGuid()
}
return {
type: 'CREATE_NOTIFICATION',
notification: {
key: key,
type: type,
content: content
title: title,
content: content,
sticky: sticky
}
}
}