How to use the sweetalert2/dist/sweetalert2.js.mixin function in sweetalert2

To help you get started, we’ve selected a few sweetalert2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tchiotludo / kafkahq / assets / modules / templates / toast.js View on Github external
_create: function () {
        let toast = swal.mixin({
            toast: true,
            position: 'top-end',
            showConfirmButton: false,
            timer: 10000
        });

        let message = {};

        message.text = this.options.message;

        if (this.options.title) {
            message.title = this.options.title;
        }

        if (this.options.type) {
            message.type = this.options.type;
github nurdism / neko / client / src / plugins / swal.ts View on Github external
const swalFunction = (...args: [SweetAlertOptions]) => {
      if (options) {
        const mixed = Swal.mixin(options)

        return mixed.fire.apply(mixed, args)
      }

      return Swal.fire.apply(Swal, args)
    }
github avil13 / vue-sweetalert2 / src / index.ts View on Github external
const swalFunction = (...args: [SweetAlertOptions]) => {
            if (options) {
                const mixed = Swal.mixin(options);

                return mixed.fire.apply(mixed, args);
            }

            return Swal.fire.apply(Swal, args);
        };