discourse/app/assets/javascripts/admin/addon/components/value-list.hbs
Kris f6c5eca485
DEV: add btn-default classes to buttons using default styling (#31039)
All of these buttons use our default grey background styling, but aren't
carrying the `btn-default` class, which makes them easier to target in
themes. This PR adds the class.
2025-01-28 15:40:34 -05:00

42 lines
No EOL
1.1 KiB
Handlebars
Vendored

{{#if this.collection}}
<div class="values">
{{#each this.collection as |value index|}}
<div data-index={{index}} class="value">
<DButton
@action={{fn this.removeValue value}}
@icon="xmark"
class="btn-default remove-value-btn btn-small"
/>
<Input
title={{value}}
@value={{value}}
class="value-input"
{{on "focusout" (fn this.changeValue index)}}
/>
{{#if this.showUpDownButtons}}
<DButton
@action={{fn this.shift -1 index}}
@icon="arrow-up"
class="btn-default shift-up-value-btn btn-small"
/>
<DButton
@action={{fn this.shift 1 index}}
@icon="arrow-down"
class="btn-default shift-down-value-btn btn-small"
/>
{{/if}}
</div>
{{/each}}
</div>
{{/if}}
<ComboBox
@valueProperty={{null}}
@nameProperty={{null}}
@value={{this.newValue}}
@content={{this.filteredChoices}}
@onChange={{this.selectChoice}}
@options={{hash allowAny=true none=this.noneKey}}
/>