You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constants.js 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. // @flow
  2. /**
  3. * The standard time when auto-disappearing notifications should disappear.
  4. */
  5. export const NOTIFICATION_TIMEOUT = {
  6. SHORT: 2500,
  7. MEDIUM: 5000,
  8. LONG: 10000,
  9. STICKY: false
  10. };
  11. /**
  12. * Notification timeout type.
  13. */
  14. export const NOTIFICATION_TIMEOUT_TYPE = {
  15. SHORT: 'short',
  16. MEDIUM: 'medium',
  17. LONG: 'long',
  18. STICKY: 'sticky'
  19. };
  20. /**
  21. * The set of possible notification types.
  22. *
  23. * @enum {string}
  24. */
  25. export const NOTIFICATION_TYPE = {
  26. ERROR: 'error',
  27. INFO: 'info',
  28. NORMAL: 'normal',
  29. SUCCESS: 'success',
  30. WARNING: 'warning'
  31. };
  32. /**
  33. * A mapping of notification type to priority of display.
  34. *
  35. * @enum {number}
  36. */
  37. export const NOTIFICATION_TYPE_PRIORITIES = {
  38. [NOTIFICATION_TYPE.ERROR]: 5,
  39. [NOTIFICATION_TYPE.INFO]: 3,
  40. [NOTIFICATION_TYPE.NORMAL]: 3,
  41. [NOTIFICATION_TYPE.SUCCESS]: 3,
  42. [NOTIFICATION_TYPE.WARNING]: 4
  43. };
  44. /**
  45. * Amount of participants beyond which no join notification will be emitted.
  46. */
  47. export const SILENT_JOIN_THRESHOLD = 30;