rm-components
Version:
The default blueprint for ember-cli addons.
15 lines (13 loc) • 389 B
JavaScript
export default function rmAlert(obj) {
// console.log("sweet alerts!");
// console.log(arguments);
// debugger;
if (typeof arguments[0] === 'object') {
// full object, callback if there
window.swal(obj, arguments[1] || function() {});
} else {
// message, title, type style
window.swal(arguments[0], arguments[1] || '', arguments[2] || '');
}
return true;
}