Ghost/ghost/admin/app/components/custom-theme-settings/select.hbs
Michael Barrett 721d7202a0
Added truncation to custom theme setting description (#17044)
no issue

Added truncation to custom theme setting description to prevent overly
long custom setting descriptions from diminishing the settings UX
2023-06-16 13:14:43 +01:00

21 lines
997 B
Handlebars

<div class="gh-stack-item {{if (eq @index 0) "gh-setting-first" "gh-setting"}}">
<div class="flex-grow-1">
<label class="gh-setting-title gh-theme-setting-title" for={{this.selectId}}>
{{humanize-setting-key @setting.key}}
</label>
<span class="gh-select">
<select class="ember-select" name={{this.selectName}} id={{this.selectId}} {{on "change" this.setSelection}}>
{{#each @setting.options as |settingOption|}}
<option value={{settingOption}} selected={{eq settingOption @setting.value}}>
{{settingOption}}
{{#if (eq settingOption @setting.default)}}(default){{/if}}
</option>
{{/each}}
</select>
{{svg-jar "arrow-down-small"}}
</span>
{{#if @setting.description}}
<div class="gh-setting-desc">{{truncate @setting.description 100}}</div>
{{/if}}
</div>
</div>