-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
72 lines (69 loc) · 2.18 KB
/
index.html
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>RoarJS Alert</title>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="dist/roar.min.css">
</head>
<body>
<button onclick="demo1()">Demo 1</button>
<button onclick="demo2()">Demo 2</button>
<button onclick="demo3()">Demo 3</button>
<script src="dist/roar.min.js"></script>
<script>
/*
* Custom demos
*/
function demo1() {
const options = {
cancel: true,
cancelText: "cancel",
cancelCallBack: (event) => {
console.log("options.cancelCallBack");
},
confirm: true,
confirmText: "confirm",
confirmCallBack: (event) => {
console.log("options.confirmCallBack");
}
};
roar(
"demo 1",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a purus non turpis scelerisque molestie. Pellentesque id interdum nulla. Etiam nec ex porta, blandit felis eget, pulvinar turpis. Nam efficitur placerat nisl, ut tempor leo finibus eget. Praesent non dolor id purus scelerisque elementum ac eu enim. Cras euismod ipsum id mi malesuada, nec porttitor velit pulvinar. Proin hendrerit libero fringilla augue euismod, sit amet molestie dui dapibus. Mauris libero quam, bibendum et quam at, condimentum eleifend libero.",
options
);
}
function demo2() {
const options = {
cancel: false,
cancelText: "cancel",
cancelCallBack: (event) => {
console.log("options.cancelCallBack");
},
confirm: true,
confirmText: "confirm",
confirmCallBack: (event) => {
console.log("options.confirmCallBack");
}
};
roar("demo 2", "demo 2 show message", options);
}
function demo3() {
const options = {
cancel: true,
cancelText: "cancel button",
cancelCallBack: (event) => {
console.log("options.cancelCallBack");
},
confirm: true,
confirmText: "confirm button",
confirmCallBack: (event) => {
console.log("options.confirmCallBack");
}
};
roar("demo 3", "demo 3 show message", options);
}
</script>
</body>
</html>