sweetalert2
Swal.fire(
'Data Add Successfully!',
'You clicked the button!',
'success'
)
sweetalert2
Swal.fire(
'Data Add Successfully!',
'You clicked the button!',
'success'
)
sweetalert2
$ npm install sweetalert2
sweet alert 2
Swal.fire({
title: 'Do you want to save the changes?',
showDenyButton: true,
showCancelButton: true,
confirmButtonText: `Save`,
denyButtonText: `Don't save`,
}).then((result) => {
/* Read more about isConfirmed, isDenied below */
if (result.isConfirmed) {
Swal.fire('Saved!', '', 'success')
} else if (result.isDenied) {
Swal.fire('Changes are not saved', '', 'info')
}
})
sweetalert2 if else
swal({
title: 'Input something',
input: 'text',
showCancelButton: true,
inputValidator: function(value) {
return new Promise(function(resolve, reject) {
if (value) {
resolve();
} else {
reject('You need to write something!');
}
});
}
}).then(function(result) {
swal({
type: 'success',
html: 'You entered: ' + result
});
})
sweetalert2
Swal.fire(
'Good job!',
'You clicked the button!',
'failed'
)
sweetalert2
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}`)}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us