mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #4435 from ToastHawaii/master
Update type definitions from SweetAlert to 1.0.1
This commit is contained in:
@@ -63,7 +63,10 @@ swal({
|
||||
text: "I will close in 2 seconds.",
|
||||
timer: 2000,
|
||||
showConfirmButton: false
|
||||
});
|
||||
},
|
||||
function () {
|
||||
swal("Time Out!", "The time is out of joint.", "success");
|
||||
});
|
||||
|
||||
// A replacement for the "prompt" function
|
||||
swal({
|
||||
@@ -73,7 +76,8 @@ swal({
|
||||
showCancelButton: true,
|
||||
closeOnConfirm: false,
|
||||
animation: "slide-from-top",
|
||||
inputPlaceholder: "Write something"
|
||||
inputPlaceholder: "Write something plx",
|
||||
inputValue: "Write something"
|
||||
},
|
||||
function (inputValue) {
|
||||
if (inputValue === false) return false;
|
||||
|
||||
Vendored
+8
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for SweetAlert 1.0.0-beta
|
||||
// Type definitions for SweetAlert 1.0.1
|
||||
// Project: https://github.com/t4t5/sweetalert/
|
||||
// Definitions by: Markus Peloso <https://github.com/ToastHawaii/>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
@@ -97,7 +97,7 @@ declare module SweetAlert {
|
||||
imageSize?: string;
|
||||
|
||||
/**
|
||||
* Auto close timer of the modal.Set in ms (milliseconds).
|
||||
* Auto close timer of the modal. Set in ms (milliseconds).
|
||||
* Default: null
|
||||
*/
|
||||
timer?: number;
|
||||
@@ -125,6 +125,12 @@ declare module SweetAlert {
|
||||
* Default: null
|
||||
*/
|
||||
inputPlaceholder?: string;
|
||||
|
||||
/**
|
||||
* Specify a default text value that you want your input to show when using type: "input"
|
||||
* Default: null
|
||||
*/
|
||||
inputValue?: string;
|
||||
}
|
||||
|
||||
interface Settings extends SettingsBase {
|
||||
|
||||
Reference in New Issue
Block a user