aboutsummaryrefslogtreecommitdiff
path: root/input/index.html
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-09-05 15:28:30 +0700
committerShulhan <ms@kilabit.info>2021-09-05 18:36:42 +0700
commit437cee56693f69b2a58f37f8a5ff5b931ea803a2 (patch)
tree540378dcb05d299644d4679db85e80a1731fb9bd /input/index.html
parent865173ec06c86ebb900c22b066dcf210f2e0452d (diff)
downloadpakakeh.ts-437cee56693f69b2a58f37f8a5ff5b931ea803a2.tar.xz
input: implement class for input number
The WuiInputNumber create an HTML input that allow number only, with optional max and min options. The required options is "label" and "value". Format of generated HTML output, <div [id=${id}] class="${WUI_INPUT_NUMBER_CLASS}"> <div> <label class="${WUI_INPUT_NUMBER_CLASS_LABEL}">${label}</label> <input class="${WUI_INPUT_NUMBER_CLASS_INPUT}" [max=${max}] [min=${min}] [disabled=${is_disabled}] value=${value} > <span class="${WUI_INPUT_NUMBER_CLASS_HINT_TOGGLER}">i </span> </div> <div class="${WUI_INPUT_NUMBER_CLASS_HINT}">${hint}</div> </div> User can set onChangeHandler to receive new value when the value changes and valid; otherwise, if the value is invalid, the input background will changes accordingly.
Diffstat (limited to 'input/index.html')
-rw-r--r--input/index.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/input/index.html b/input/index.html
new file mode 100644
index 0000000..714932f
--- /dev/null
+++ b/input/index.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="UTF-8" />
+ <title>WUI - input</title>
+ <style>
+ </style>
+ </head>
+ <body>
+ <script type="module" src="/input/example.js"></script>
+ </body>
+</html>