aboutsummaryrefslogtreecommitdiff
path: root/notif/example.ts
diff options
context:
space:
mode:
Diffstat (limited to 'notif/example.ts')
-rw-r--r--notif/example.ts34
1 files changed, 17 insertions, 17 deletions
diff --git a/notif/example.ts b/notif/example.ts
index a15f986..b2ff5d7 100644
--- a/notif/example.ts
+++ b/notif/example.ts
@@ -18,42 +18,42 @@ function main() {
inputMsg.value = `Hello world, this is a notification with HTML format using <b>bold</b> and <u>underline</u> words.`;
document.body.appendChild(inputMsg);
- let el_wrapper = document.createElement("div");
- el_wrapper.style.marginTop = "10px";
- document.body.appendChild(el_wrapper);
+ const elWrapper = document.createElement("div");
+ elWrapper.style.marginTop = "10px";
+ document.body.appendChild(elWrapper);
- let el_button_info = document.createElement("button");
- el_button_info.innerText = "Info";
- el_button_info.style.marginRight = "10px";
- el_button_info.onclick = notifInfo;
- el_wrapper.appendChild(el_button_info);
+ const elButtonInfo = document.createElement("button");
+ elButtonInfo.innerText = "Info";
+ elButtonInfo.style.marginRight = "10px";
+ elButtonInfo.onclick = notifInfo;
+ elWrapper.appendChild(elButtonInfo);
- let el_button_error = document.createElement("button");
- el_button_error.innerText = "Error";
- el_button_error.onclick = notifError;
- el_wrapper.appendChild(el_button_error);
+ const elButtonError = document.createElement("button");
+ elButtonError.innerText = "Error";
+ elButtonError.onclick = notifError;
+ elWrapper.appendChild(elButtonError);
document.body.appendChild(document.createElement("p"));
- let previewError = document.createElement("div");
+ const previewError = document.createElement("div");
previewError.classList.add(`${WUI_NOTIF_CLASS_ERROR}`);
previewError.innerText = `Preview of error style`;
document.body.appendChild(previewError);
- let previewInfo = document.createElement("div");
+ const previewInfo = document.createElement("div");
previewInfo.classList.add(`${WUI_NOTIF_CLASS_INFO}`);
previewInfo.innerText = `Preview of info style`;
document.body.appendChild(previewInfo);
}
function notifInfo() {
- wuiNotif.Info(inputMsg.value);
+ wuiNotif.info(inputMsg.value);
}
function notifError() {
- wuiNotif.Error(inputMsg.value);
+ wuiNotif.error(inputMsg.value);
}
-//----
+// ----
main();