diff options
| author | Adam Soltys <[email protected]> | 2023-12-07 23:36:01 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-12-07 23:36:01 -0800 |
| commit | fdef64da149ed0ceae3778238b9882a576e562ef (patch) | |
| tree | 6e09aed6a1f282ce730f804241d0bc263af2981e /src/lib | |
| parent | d88d4a9b1d8f229904f4a052e03b860a82811a71 (diff) | |
| download | coinos-ui-fdef64da149ed0ceae3778238b9882a576e562ef.tar.gz coinos-ui-fdef64da149ed0ceae3778238b9882a576e562ef.zip | |
verified flow
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/utils.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/utils.js b/src/lib/utils.js index adbe8356..f55b47b6 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -101,8 +101,8 @@ export function reverseFormat(val, locale) { export let protectedRoutes = [/customers/, /settings/, /payments/]; -export let success = (m) => { - toast.pop(); +export let success = (m, clear = true) => { + if (clear) toast.pop(); toast.push(m, { theme: { "--toastBarBackground": "#F5F7FA", @@ -110,16 +110,16 @@ export let success = (m) => { }); }; -export let warning = (m) => { - toast.pop(); +export let warning = (m, clear = true) => { + if (clear) toast.pop(); toast.push(m, { theme: { "--toastBarBackground": "#FFCE22", }, }); }; -export let fail = (m) => { - toast.pop(); +export let fail = (m, clear = true) => { + if (clear) toast.pop(); toast.push(m, { theme: { "--toastBarBackground": "#E93535", |
