@devtron-labs/devtron-fe-common-lib 0.0.7-beta-8 → 0.0.7-beta-9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -0
- package/package.json +1 -1
- package/src/Common/Helper.tsx +11 -0
package/dist/index.js
CHANGED
|
@@ -3904,6 +3904,16 @@ function captureException(exception, captureContext) {
|
|
|
3904
3904
|
return getCurrentHub().captureException(exception, { captureContext });
|
|
3905
3905
|
}
|
|
3906
3906
|
|
|
3907
|
+
toast.configure({
|
|
3908
|
+
autoClose: 3000,
|
|
3909
|
+
hideProgressBar: true,
|
|
3910
|
+
pauseOnHover: true,
|
|
3911
|
+
pauseOnFocusLoss: true,
|
|
3912
|
+
closeOnClick: false,
|
|
3913
|
+
newestOnTop: true,
|
|
3914
|
+
toastClassName: 'devtron-toast',
|
|
3915
|
+
bodyClassName: 'devtron-toast__body',
|
|
3916
|
+
});
|
|
3907
3917
|
function showError(serverError, showToastOnUnknownError, hideAccessError) {
|
|
3908
3918
|
if (showToastOnUnknownError === void 0) { showToastOnUnknownError = true; }
|
|
3909
3919
|
if (hideAccessError === void 0) { hideAccessError = false; }
|
package/package.json
CHANGED
package/src/Common/Helper.tsx
CHANGED
|
@@ -5,6 +5,17 @@ import { toastAccessDenied } from './ToastBody'
|
|
|
5
5
|
import { useEffect, useRef } from 'react'
|
|
6
6
|
import { ERROR_EMPTY_SCREEN } from './Constants'
|
|
7
7
|
|
|
8
|
+
toast.configure({
|
|
9
|
+
autoClose: 3000,
|
|
10
|
+
hideProgressBar: true,
|
|
11
|
+
pauseOnHover: true,
|
|
12
|
+
pauseOnFocusLoss: true,
|
|
13
|
+
closeOnClick: false,
|
|
14
|
+
newestOnTop: true,
|
|
15
|
+
toastClassName: 'devtron-toast',
|
|
16
|
+
bodyClassName: 'devtron-toast__body',
|
|
17
|
+
})
|
|
18
|
+
|
|
8
19
|
export function showError(serverError, showToastOnUnknownError = true, hideAccessError = false) {
|
|
9
20
|
if (serverError instanceof ServerErrors && Array.isArray(serverError.errors)) {
|
|
10
21
|
serverError.errors.map(({ userMessage, internalMessage }) => {
|