diff options
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", |
