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

25 lines
665 B
Handlebars

<label class="wizard-container__label">
<PluginOutlet
@name="wizard-checkbox"
@outletArgs={{hash disabled=this.field.disabled}}
>
<Input
@type="checkbox"
disabled={{this.field.disabled}}
class="wizard-container__checkbox"
@checked={{this.field.value}}
/>
<span class="wizard-container__checkbox-slider"></span>
{{#if this.field.icon}}
{{d-icon this.field.icon}}
{{/if}}
<span class="wizard-container__checkbox-label">
{{this.field.placeholder}}
</span>
</PluginOutlet>
<PluginOutlet
@name="below-wizard-checkbox"
@outletArgs={{hash disabled=this.field.disabled}}
/>
</label>