open-nomad/ui/app/templates/components/stepper-input.hbs
Buck Doyle ea2adb3bf6
Update template linting and fix missed curly invocations (#8382)
This includes fixes for newer template lint rules that came along with
updating that dependency, which was necessary to be able to use
the no-curly-component-invocation rule. It also updates some curly
invocations that I missed in #8075.
2020-07-09 12:30:11 -05:00

36 lines
912 B
Handlebars

<label
data-test-stepper-label
class="stepper-input-label"
onClick={{action "focusInput"}}>{{yield}}</label>
<input
data-test-stepper-input
type="number"
min={{min}}
max={{max}}
value={{internalValue}}
disabled={{disabled}}
class="stepper-input-input"
onFocus={{action "selectValue"}}
onKeyDown={{action "resetTextInput"}}
onChange={{action "setValue"}}>
<button
data-test-stepper-decrement
role="button"
aria-label="decrement"
class="stepper-input-stepper button {{class}}"
disabled={{or disabled (lte internalValue min)}}
onclick={{action "decrement"}}
type="button">
{{x-icon "minus-plain"}}
</button>
<button
data-test-stepper-increment
role="button"
aria-label="increment"
class="stepper-input-stepper button {{class}}"
disabled={{or disabled (gte internalValue max)}}
onclick={{action "increment"}}
type="button">
{{x-icon "plus-plain"}}
</button>