Ghost/ghost/admin/app/components/custom-theme-settings/text.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

19 lines
693 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.inputId}}>
{{humanize-setting-key @setting.key}}
</label>
<input
type="text"
class="gh-input"
value={{@setting.value}}
id={{this.inputId}}
name={{this.inputName}}
{{on "input" this.updateValue}}
{{on "blur" this.triggerOnChange}}
/>
{{#if @setting.description}}
<div class="gh-setting-desc">{{truncate @setting.description 100}}</div>
{{/if}}
</div>
</div>