244157786a
This is the result of running the no-implicit-this-codemod, some manual fixes, and the addition of a linting rule to prevent future ambiguity.
36 lines
972 B
Handlebars
36 lines
972 B
Handlebars
<label
|
|
data-test-stepper-label
|
|
class="stepper-input-label"
|
|
onClick={{action "focusInput"}}>{{yield}}</label>
|
|
<input
|
|
data-test-stepper-input
|
|
type="number"
|
|
min={{this.min}}
|
|
max={{this.max}}
|
|
value={{this.internalValue}}
|
|
disabled={{this.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 {{this.class}}"
|
|
disabled={{or this.disabled (lte this.internalValue this.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 {{this.class}}"
|
|
disabled={{or this.disabled (gte this.internalValue this.max)}}
|
|
onclick={{action "increment"}}
|
|
type="button">
|
|
{{x-icon "plus-plain"}}
|
|
</button>
|