@dargmuesli/nuxt-vio 1.9.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +2 -1
- package/utils/modal.ts +16 -0
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@dargmuesli/nuxt-vio",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.10.0",
|
4
4
|
"type": "module",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -44,6 +44,7 @@
|
|
44
44
|
"@nuxtjs/tailwindcss": "6.6.6",
|
45
45
|
"@tailwindcss/typography": "0.5.9",
|
46
46
|
"nuxt-seo-kit": "1.3.7",
|
47
|
+
"sweetalert2": "11.7.3",
|
47
48
|
"vue-gtag": "2.0.1"
|
48
49
|
},
|
49
50
|
"devDependencies": {
|
package/utils/modal.ts
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
import Swal from 'sweetalert2'
|
2
|
+
|
3
|
+
export const showToast = ({ title }: { title: string }) =>
|
4
|
+
Swal.fire({
|
5
|
+
didOpen: (toast) => {
|
6
|
+
toast.addEventListener('mouseenter', Swal.stopTimer)
|
7
|
+
toast.addEventListener('mouseleave', Swal.resumeTimer)
|
8
|
+
},
|
9
|
+
icon: 'success',
|
10
|
+
position: 'bottom',
|
11
|
+
showConfirmButton: false,
|
12
|
+
timer: 3000,
|
13
|
+
timerProgressBar: true,
|
14
|
+
title,
|
15
|
+
toast: true,
|
16
|
+
})
|