PluginProbe
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses / 4.4.8
LearnPress – WordPress LMS Plugin for Create and Sell Online Courses v4.4.8
4.4.8 4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 4.4.0 4.3.9.1 4.3.9 4.3.8 4.3.7 4.1.6.9 4.1.6.9.1 4.1.6.9.2 4.1.6.9.3 4.1.6.9.4 4.1.7 4.1.7.1 4.1.7.2 4.1.7.3 4.1.7.3.1 4.1.7.3.2 4.2.0 All 139 releases
← All changes | assets/src/js/lpToastify.js +34 -34 4.3.94.4.8 View file →
@@ -1,34 +1,34 @@
1 -/**
2 - * Utils functions
3 - *
4 - * @param url
5 - * @param data
6 - * @param functions
7 - * @since 4.3.0
8 - * @version 1.0.0
9 - */
10 -import Toastify from 'toastify-js';
11 -import 'toastify-js/src/toastify.css';
12 -
13 -const argsToastify = {
14 - text: '',
15 - gravity: lpData.toast.gravity, // `top` or `bottom`
16 - position: lpData.toast.position, // `left`, `center` or `right`
17 - className: `${ lpData.toast.classPrefix }`,
18 - close: lpData.toast.close == 1,
19 - stopOnFocus: lpData.toast.stopOnFocus == 1,
20 - duration: lpData.toast.duration,
21 -};
22 -export const show = ( message, status = 'success', argsCustom ) => {
23 - let args = argsToastify;
24 - if ( argsCustom ) {
25 - args = { ...args, ...argsCustom };
26 - }
27 -
28 - const toastify = new Toastify( {
29 - ...args,
30 - text: message,
31 - className: `${ lpData.toast.classPrefix } ${ status }`,
32 - } );
33 - toastify.showToast();
34 -};
1 +/**
2 + * Utils functions
3 + *
4 + * @param url
5 + * @param data
6 + * @param functions
7 + * @since 4.3.0
8 + * @version 1.0.0
9 + */
10 +import Toastify from 'toastify-js';
11 +import 'toastify-js/src/toastify.css';
12 +
13 +const argsToastify = {
14 + text: '',
15 + gravity: lpData.toast.gravity, // `top` or `bottom`
16 + position: lpData.toast.position, // `left`, `center` or `right`
17 + className: `${ lpData.toast.classPrefix }`,
18 + close: lpData.toast.close == 1,
19 + stopOnFocus: lpData.toast.stopOnFocus == 1,
20 + duration: lpData.toast.duration,
21 +};
22 +export const show = ( message, status = 'success', argsCustom ) => {
23 + let args = argsToastify;
24 + if ( argsCustom ) {
25 + args = { ...args, ...argsCustom };
26 + }
27 +
28 + const toastify = new Toastify( {
29 + ...args,
30 + text: message,
31 + className: `${ lpData.toast.classPrefix } ${ status }`,
32 + } );
33 + toastify.showToast();
34 +};