2024-10-24 14:15:08 +00:00
|
|
|
<div class="{{@wrapper-classes}}">
|
2024-11-19 14:05:12 +00:00
|
|
|
{{#if @readonly}}
|
|
|
|
<ul>
|
|
|
|
{{#each this.args.list as |element|}}
|
|
|
|
<p class="{{@readonly-element-classes}}">{{element.value}}</p>
|
|
|
|
{{/each}}
|
|
|
|
</ul>
|
|
|
|
{{else}}
|
2024-10-24 14:15:08 +00:00
|
|
|
<ul>
|
|
|
|
{{#each this.args.list as |element index|}}
|
|
|
|
<li>
|
2024-10-29 12:23:04 +00:00
|
|
|
<div class="string-array-element-wrapper {{@element-wrapper-classes}}">
|
2024-10-24 14:15:08 +00:00
|
|
|
<Input
|
2024-10-29 12:23:04 +00:00
|
|
|
class="{{@element-classes}}"
|
2024-10-24 14:15:08 +00:00
|
|
|
@type="text"
|
|
|
|
@value={{element.value}}
|
|
|
|
/>
|
|
|
|
<div
|
|
|
|
class="{{@remove-element-classes}}"
|
|
|
|
type="button"
|
2024-10-25 14:54:48 +00:00
|
|
|
{{on "click" (fn this.removeElement index)}}
|
2024-10-24 14:15:08 +00:00
|
|
|
>
|
|
|
|
X
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
{{/each}}
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
<div
|
|
|
|
class="{{@add-element-classes}}"
|
|
|
|
type="button"
|
|
|
|
{{on "click" this.addElement}}
|
|
|
|
>
|
|
|
|
Add element
|
|
|
|
</div>
|
2024-11-19 14:05:12 +00:00
|
|
|
{{/if}}
|
2024-10-24 14:15:08 +00:00
|
|
|
</div>
|