2019-03-27 14:00:10 +00:00
|
|
|
// @flow
|
|
|
|
|
2019-03-29 13:37:50 +00:00
|
|
|
/**
|
|
|
|
* The standard time when auto-disappearing notifications should disappear.
|
|
|
|
*/
|
|
|
|
export const NOTIFICATION_TIMEOUT = 2500;
|
|
|
|
|
2017-11-03 19:05:03 +00:00
|
|
|
/**
|
|
|
|
* The set of possible notification types.
|
|
|
|
*
|
|
|
|
* @enum {string}
|
|
|
|
*/
|
|
|
|
export const NOTIFICATION_TYPE = {
|
|
|
|
ERROR: 'error',
|
|
|
|
INFO: 'info',
|
|
|
|
NORMAL: 'normal',
|
|
|
|
SUCCESS: 'success',
|
|
|
|
WARNING: 'warning'
|
|
|
|
};
|
2017-11-27 16:47:01 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A mapping of notification type to priority of display.
|
|
|
|
*
|
|
|
|
* @enum {number}
|
|
|
|
*/
|
|
|
|
export const NOTIFICATION_TYPE_PRIORITIES = {
|
|
|
|
[NOTIFICATION_TYPE.ERROR]: 5,
|
|
|
|
[NOTIFICATION_TYPE.INFO]: 3,
|
|
|
|
[NOTIFICATION_TYPE.NORMAL]: 3,
|
|
|
|
[NOTIFICATION_TYPE.SUCCESS]: 3,
|
|
|
|
[NOTIFICATION_TYPE.WARNING]: 4
|
|
|
|
};
|