linstrom/frontend-reactive/app/components/util/string-array.hbs

29 lines
615 B
Handlebars
Raw Normal View History

<div class="{{@wrapper-classes}}">
<ul>
{{#each this.args.list as |element index|}}
<li>
<div class="string-array-element-wrapper">
<Input
@type="text"
@value={{element.value}}
/>
<div
class="{{@remove-element-classes}}"
type="button"
{{on "click" (fn this.removeElement index)}}
>
X
</div>
</div>
</li>
{{/each}}
</ul>
<div
class="{{@add-element-classes}}"
type="button"
{{on "click" this.addElement}}
>
Add element
</div>
</div>