Skip to content

Instantly share code, notes, and snippets.

@Medalink
Created January 16, 2020 21:17
Show Gist options
  • Save Medalink/c6a9d2444e1062a92c75bc9f42b8f26b to your computer and use it in GitHub Desktop.
Save Medalink/c6a9d2444e1062a92c75bc9f42b8f26b to your computer and use it in GitHub Desktop.
Vue.swal({
title: 'Are you sure?',
text: 'Selecting another sub category will result in all selections being reset.',
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'Yes, clear selections',
reverseButtons: true,
}).then((result) => {
if (result.value) {
// Button was accepted, do your thing
let clearPreviousSubCategory = true;
this.changeSubCategory(subCategoryId, clearPreviousSubCategory);
}
});
And inside the vue CSS:
.swal2-popup {
font-size: 1.6rem !important;
}
.swal2-confirm, .swal2-cancel {
font-size: 1.8rem !important;
padding: 8px 10px !important;
margin: 4px 8px !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment