journal-to-canvas-slideshow/templates/fieldset-button-group.hbs

46 lines
1.5 KiB
Handlebars
Raw Permalink Normal View History

2024-01-28 15:59:53 -06:00
<fieldset class="button-group flex-justify-space-evenly gap-small {{extraClass}}">
{{#each this.choices}}
<span class="input-span slight-rounded fit-content-width interactive" data-variant="{{../variant}}">
<input
type="{{../type}}"
class="accent-input"
id="{{concat ../propertyString "." @key}}"
{{#if (eq ../type "radio")}}
value="{{@key}}"
name="{{../propertyString}}"
{{#if (eq ../chosen @key)}}
checked
{{/if}}
{{else}}
name="{{concat ../propertyString "." @key}}"
{{#if (eq ../isDisabled true)}}
disabled
{{/if}}
{{#if (eq this true)}}
checked
{{/if}}
{{/if}}
/>
<label class="flex-row slight-rounded gap-small padding-small interactive" for="{{concat ../propertyString "." @key}}" data-title="">
{{#if (eq ../variant "visible-tick") }}
{{#if (eq ../type "radio")}}
<span class="tick-circle"></span>
{{else}}
<span class="tick-box"></span>
{{/if}}
{{/if}}
{{#if (eq ../type "radio")}}
{{this}}
{{else}}
{{camelCaseToCapitalString @key}}
{{/if}}
</label>
</span>
{{/each}}
</fieldset>