0
Q:

sweetalert2

<script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>
2
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@10"></script>
0
const { value: email } = await Swal.fire({  title: 'Input email address',  input: 'email',  inputLabel: 'Your email address',  inputPlaceholder: 'Enter your email address'})if (email) {  Swal.fire(`Entered email: ${email}`)}
0
Swal.fire({  title: 'Are you sure?',  text: 'You will not be able to recover this imaginary file!',  icon: 'warning',  showCancelButton: true,  confirmButtonText: 'Yes, delete it!',  cancelButtonText: 'No, keep it'}).then((result) => {  if (result.value) {    Swal.fire(      'Deleted!',      'Your imaginary file has been deleted.',      'success'    )  // For more information about handling dismissals please visit  // https://sweetalert2.github.io/#handling-dismissals  } else if (result.dismiss === Swal.DismissReason.cancel) {    Swal.fire(      'Cancelled',      'Your imaginary file is safe :)',      'error'    )  }})
0
$.sweetModal({
	title: {
		tab1: {
			label: 'Tab 1'
		},

		tab2: {
			label: 'Tab 2'
		}
	},

	content: {
		tab1: 'Tab 1',
		tab2: 'Tab 2'
	},

	buttons: {
		someOtherAction: {
			label: 'Action 2',
			classes: 'secondaryB bordered flat',
			action: function() {
				return $.sweetModal('You clicked Action 2!');
			}
		},

		someAction: {
			label: 'Action 1',
			classes: '',
			action: function() {
				return $.sweetModal('You clicked Action 1!');
			}
		},
	}
});
-1

New to Communities?

Join the community