diff options
author | sanine-a <sanine.not@pm.me> | 2021-04-13 11:37:51 -0500 |
---|---|---|
committer | sanine-a <sanine.not@pm.me> | 2021-04-13 11:37:51 -0500 |
commit | c9c1b78ed805371615d3ca8b54c86da9a35db8ce (patch) | |
tree | 1af9063f2e30392fc039738105f86461dddec576 /InputBox.js | |
parent | bc594a2d3839d1d0a3cc76eed23ec8535c72f6bf (diff) |
implement basic user input and button styling
Diffstat (limited to 'InputBox.js')
-rw-r--r-- | InputBox.js | 18 |
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, + } + ); +} |