Skip to content

Instantly share code, notes, and snippets.

@siteslave
Created July 13, 2021 01:42
Show Gist options
  • Save siteslave/8e19d330dd0af7683d80610560592854 to your computer and use it in GitHub Desktop.
Save siteslave/8e19d330dd0af7683d80610560592854 to your computer and use it in GitHub Desktop.
// "sweetalert2": "^11.0.17"
import Swal, { SweetAlertResult } from 'sweetalert2'
var confirm: SweetAlertResult = await Swal.fire({
title: 'ยืนยัน',
text: 'ต้องการยกเลิกการจอง ใช่หรือไม่?',
icon: 'warning',
showCancelButton: true,
confirmButtonText: 'ใช่',
cancelButtonText: "ไม่ใช่",
});
if (confirm.isConfirmed) {
// ok
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment