From c9c1b78ed805371615d3ca8b54c86da9a35db8ce Mon Sep 17 00:00:00 2001 From: sanine-a Date: Tue, 13 Apr 2021 11:37:51 -0500 Subject: implement basic user input and button styling --- InputBox.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 InputBox.js (limited to 'InputBox.js') 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, + } + ); +} -- cgit v1.2.1