discourse/app/assets/javascripts/wizard/addon/components/fields/checkboxes.hbs
David Taylor e4c373194d
DEV: Refactor Wizard components (#24770)
This commit refactors the Wizard component code in preparation for moving it to the 'static' directory for Embroider route-splitting. It also includes a number of general improvements and simplifications.

Extracted from https://github.com/discourse/discourse/pull/23678

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
2023-12-07 16:33:38 +00:00

16 lines
409 B
Handlebars

{{#each this.field.choices as |c|}}
<div class="checkbox-field-choice {{this.fieldClass}}">
<label id={{c.id}} value={{c.label}}>
<Input
@type="checkbox"
class="wizard-container__checkbox"
@checked={{c.checked}}
{{on "click" (action "changed")}}
/>
{{#if c.icon}}
{{d-icon c.icon}}
{{/if}}
{{c.label}}
</label>
</div>
{{/each}}