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 --- StyleButton.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 StyleButton.js (limited to 'StyleButton.js') diff --git a/StyleButton.js b/StyleButton.js new file mode 100644 index 0000000..806ece6 --- /dev/null +++ b/StyleButton.js @@ -0,0 +1,15 @@ +function StyleButton(props) +{ + const { enabled, handleClick } = props; + + const className = enabled ? 'StyleButtonEnabled' : 'StyleButtonDisabled'; + + + return h( + `div.unselectable.StyleButton.${className}`, + { + onClick: handleClick, + }, + props.text + ); +} -- cgit v1.2.1