Shun Miyazawa 4 лет назад
Родитель
Сommit
18900edf72
1 измененных файлов с 9 добавлено и 1 удалено
  1. 9 1
      src/client/js/util/apiNotification.js

+ 9 - 1
src/client/js/util/apiNotification.js

@@ -20,6 +20,14 @@ const toastrOption = {
     hideDuration: '100',
     timeOut: '3000',
   },
+  warning: {
+    closeButton: true,
+    progressBar: true,
+    newestOnTop: false,
+    showDuration: '100',
+    hideDuration: '100',
+    timeOut: '6000',
+  },
 };
 
 // accepts both a single error and an array of errors
@@ -36,6 +44,6 @@ export const toastSuccess = (body, header = 'Success', option = toastrOption.suc
   toastr.success(body, header, option);
 };
 
-export const toastWarning = (body, header = 'Warning', option = toastrOption.success) => {
+export const toastWarning = (body, header = 'Warning', option = toastrOption.warning) => {
   toastr.warning(body, header, option);
 };