30 lines
652 B
Handlebars
30 lines
652 B
Handlebars
|
<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"
|
||
|
id="{{this.args.prefix}}-{{index}}"
|
||
|
{{on "click" this.removeElement}}
|
||
|
>
|
||
|
X
|
||
|
</div>
|
||
|
</div>
|
||
|
</li>
|
||
|
{{/each}}
|
||
|
|
||
|
</ul>
|
||
|
<div
|
||
|
class="{{@add-element-classes}}"
|
||
|
type="button"
|
||
|
{{on "click" this.addElement}}
|
||
|
>
|
||
|
Add element
|
||
|
</div>
|
||
|
</div>
|