Notifications have customisable duration and CSS animation in-and-out
This commit is contained in:
@ -183,6 +183,7 @@ export function createNotification(data){
|
||||
notification: Object.assign(
|
||||
{
|
||||
key: helpers.generateGuid(),
|
||||
duration: 3,
|
||||
type: 'default',
|
||||
title: null,
|
||||
content: null,
|
||||
|
||||
@ -76,7 +76,7 @@ const UIMiddleware = (function(){
|
||||
function(){
|
||||
store.dispatch(uiActions.removeNotification(action.notification.key))
|
||||
},
|
||||
(action.notification.type == 'shortcut' ? 1000 : 3000)
|
||||
action.notification.duration * 1000
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user