forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
alertify-tests.ts
32 lines (22 loc) · 924 Bytes
/
alertify-tests.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/// <reference path="alertify.d.ts" />
alertify.init();
alertify.alert("This is an alert");
alertify.alert("This is an alert with a callback", () => {
alertify.success("Alert finished");
}, "myCustomClass");
alertify.confirm("This is a confirm request");
alertify.confirm("This is a confirm request with a callback", () => {
alertify.success("Confirm finished");
}, "myCustomClass");
var custom = alertify.extend("custom");
alertify.log("log message 1");
alertify.log("log message 2", "success", 3000);
alertify.prompt("prompt message 1");
alertify.prompt("prompt message 2", () => { console.log("callback"); }, "ok", "myClass");
alertify.set({ delay: 1000 });
alertify.set({ labels: { ok: "OK", cancel: "Cancel" }});
alertify.set({ buttonFocus: "ok" });
alertify.set({ buttonReverse: true });
alertify.success("This is a success message");
alertify.error("This is an error message");
alertify.debug();