TimDaub/preact-nominal-allocator

Setup state logic of preact component

Closed this issue · 1 comments

Scope

  • This issue is supposed to be done after we have created a test environment with #4.
  • Now that we can look at our preact component in the browser, it's time to build the functionality
  • As is outlined in #1, we want the component to be a <input> that is "sandwiched" by two buttons e.g.

Deliverables

<button value="-" />
<input type="number" value="1" />
<button value="+" />
  • If the user clicks the +, we want the value of input to increase. If they click -, we want the value to decrease.
  • If the user clicks/focuses on the input, we want them to be able to change the value using the keyboard too
  • There should be a min and a max value that we can define. These dictate how high or low the value you can possibly go.

Time estimate

3h

Fixed in #9