Ghost/ghost/admin/app/components/settings/design/theme-settings-form.hbs
Kevin Ansfield 9d38a0a1e1 Added support for boolean custom theme settings
refs https://github.com/TryGhost/Team/issues/1106

- removed `'string'` from the `attr()` definition for `customThemeSetting.value` so that we're not coercing the value from the API into something that doesn't work when applied to the `checked` attribute on checkbox inputs
- added initial `<CustomThemeSettings::Boolean>` component and used it for display in theme setting forms when `type === 'boolean'`
2021-10-13 17:55:17 +01:00

12 lines
488 B
Handlebars

<div class="gh-stack">
<form>
{{#each @themeSettings as |setting index|}}
{{#if (eq setting.type "select")}}
<CustomThemeSettings::Select @setting={{setting}} @index={{index}} @onChange={{@updatePreview}} />
{{/if}}
{{#if (eq setting.type "boolean")}}
<CustomThemeSettings::Boolean @setting={{setting}} @index={{index}} @onChange={{@updatePreview}} />
{{/if}}
{{/each}}
</form>
</div>