open-nomad/ui/app/templates/components/stepper-input.hbs

24 lines
595 B
Handlebars
Raw Normal View History

2020-06-19 03:13:36 +00:00
<label class="stepper-input-label">{{yield}}</label>
2020-06-18 20:19:47 +00:00
<input
type="number"
min={{min}}
max={{max}}
value={{internalValue}}
2020-06-19 03:13:36 +00:00
class="stepper-input-input"
2020-06-18 20:19:47 +00:00
onKeyDown={{action "resetTextInput"}}
onChange={{action "setValue"}}>
<button
role="button"
2020-06-19 03:13:36 +00:00
class="stepper-input-stepper button {{class}}"
2020-06-18 20:19:47 +00:00
disabled={{lte internalValue min}}
onclick={{action "decrement"}}>
{{x-icon "minus-plain"}}
</button>
<button
role="button"
2020-06-19 03:13:36 +00:00
class="stepper-input-stepper button {{class}}"
2020-06-18 20:19:47 +00:00
disabled={{gte internalValue max}}
onclick={{action "increment"}}>
{{x-icon "plus-plain"}}
</button>