-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.js
45 lines (43 loc) · 1.32 KB
/
index.js
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
$(function () {
const types = ['error', 'info', 'success', 'warning'];
$("#show-message").dxButton({
text: "Show message",
onClick: function() {
DevExpress.ui.notify(
{
message: "You have a new message",
width: 230,
position: {
my: "bottom",
at: "bottom",
of: "#container"
}
},
types[Math.floor(Math.random() * 4)],
500
);
},
});
$("#show-custom-message").dxButton({
text: "Show custom message",
onClick: function() {
DevExpress.ui.notify(
{
width: 230,
height: 50,
position: {
my: "bottom",
at: "bottom",
of: "#container"
},
contentTemplate: (element) => {
element.append('<p>You have a new message</p> ');
element.append('<i class="dx-icon-email icon-style"></i>');
}
},
"custom",
500
);
},
});
});