UX: always display remove emoji btn from emoji-value-list (#12652)

Although if emoji is not editable it should be disabled.
This commit is contained in:
Joffrey JAFFEUX 2021-04-08 13:34:26 +02:00 committed by GitHub
parent e463f5ce08
commit 6081f8e5e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 8 deletions

View File

@ -2,14 +2,13 @@
<ul class="values emoji-value-list">
{{#each collection as |data index|}}
<li class="value" data-index={{index}}>
{{#if data.isEditable}}
{{d-button
action=(action "removeValue")
actionParam=data
icon="times"
class="remove-value-btn btn-small"
}}
{{/if}}
{{d-button
action=(action "removeValue")
actionParam=data
icon="times"
class="remove-value-btn btn-small"
disabled=(not data.isEditable)
}}
<div class="value-input emoji-details {{if data.isEditable "can-edit"}} {{if data.isEditing "d-editor-textarea-wrapper"}}" {{on "click" (fn this.editValue index)}} role="button">
<img height="15px" width="15px" src={{data.emojiUrl}} class="emoji-list-emoji">