summaryrefslogtreecommitdiff
path: root/InputBox.js
diff options
context:
space:
mode:
Diffstat (limited to 'InputBox.js')
-rw-r--r--InputBox.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/InputBox.js b/InputBox.js
new file mode 100644
index 0000000..61158e0
--- /dev/null
+++ b/InputBox.js
@@ -0,0 +1,18 @@
+const linkEvent = Inferno.linkEvent;
+
+
+function InputBox(props)
+{
+ const { shaking, handleKeyDown } = props;
+
+ const className = shaking ? '.shake' : '';
+
+ return h(
+ `input${className}`,
+ {
+ type: 'text',
+ value: props.value,
+ onKeyDown: handleKeyDown,
+ }
+ );
+}