How to use the sweetalert2.swal 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 willyb321 / media_mate / app / renderjs / notify.js View on Github external
function firstrun() {
	swalNotify({
		title: 'Want to check out the tutorial?',
		text: 'I noticed this is your first run.',
		type: 'question',
		showCancelButton: true,
		confirmButtonColor: '#3085d6',
		cancelButtonColor: '#d33',
		confirmButtonText: 'Yes!'
	}).then(function () {
		remote.getCurrentWindow().loadURL(`file://${__dirname}/../renderhtml/onboard.html`);
	}).catch(err => {
		if (err !== 'cancel') {
			console.log(err);
		}
	});
}
github willyb321 / media_mate / app / renderjs / notify.js View on Github external
ipcRenderer.on('offline', (event, data) => {
	swalNotify('Offline', 'You are offline, thats fine though.', 'info');
});
github willyb321 / media_mate / app / renderjs / notify.js View on Github external
function sweetAlert(title, text, type) {
	swalNotify({
		title: title,
		text: text,
		type: type
	});
}