<div class="atm-form-radiobutton ">
<input type="radio" class="form-radiobutton" id="radiobutton-checked" name="radiobutton-checked" checked>
<label class="atm-form-label form-label " for="radiobutton-checked">Morbi efficitur sit amet diam ut feugiat. Nam a imperdiet nisl. Etiam commodo sem at ullamcorper facilisis. Morbi efficitur sit amet diam ut feugiat. Nam a imperdiet nisl. Etiam commodo sem at ullamcorper facilisis.</label>
</div>
<div class="atm-form-radiobutton {{modifier}}">
{{#if icon}}
<input
type="radio"
id="{{name}}-{{value}}"
name="{{name}}"
value="{{value}}"
class="peer hidden"
{{#if checked}}checked{{/if}}
{{#if disabled}}disabled{{/if}}
>
<label
for="{{name}}-{{value}}"
class="radiobutton-icon-wrapper"
>
{{render '@icon' icon merge=true}}
</label>
{{else}}
<input
type="radio"
class="form-radiobutton"
{{#if id}}id="{{id}}"{{/if}}
{{#if name}}name="{{name}}"{{/if}}
{{#if value}}value="{{value}}"{{/if}}
{{#if checked}}checked{{/if}}
{{#if disabled}}disabled{{/if}}>
{{render '@label' label merge=true}}
{{/if}}
</div>
{
"modifier": "",
"id": "radiobutton-checked",
"name": "radiobutton-checked",
"value": "",
"checked": true,
"disabled": false,
"label": {
"text": "Morbi efficitur sit amet diam ut feugiat. Nam a imperdiet nisl. Etiam commodo sem at ullamcorper facilisis. Morbi efficitur sit amet diam ut feugiat. Nam a imperdiet nisl. Etiam commodo sem at ullamcorper facilisis.",
"for": "radiobutton-checked"
}
}
.atm-form-radiobutton {
@apply flex items-center gap-2;
.form-radiobutton {
@apply text-cta;
&[disabled] {
@apply bg-shade;
@apply text-shade;
+ .atm-form-label {
@apply text-shade;
}
}
&:checked {
@apply bg-secondary-col-1;
}
}
}
.icon {
@apply w-full;
.radiobutton-icon-wrapper {
@apply flex items-center justify-center;
@apply py-1 md:py-3 rounded-md w-full;
@apply bg-white border-4 border-solid border-white;
@apply transition duration-300;
@apply cursor-pointer;
&:hover .atm-icon {
@apply scale-110;
}
.atm-icon {
@apply text-h5 md:text-h3 w-8 flex justify-center;
@apply transition duration-300;
@apply text-primary;
}
}
/* Peer checked state */
.peer:checked ~ .radiobutton-icon-wrapper {
@apply border-[#eec4df];
.atm-icon {
@apply text-secondary-col-1;
}
}
/* Houd rekening met disabled state */
.peer:disabled ~ .radiobutton-icon-wrapper {
@apply opacity-50 cursor-not-allowed;
}
}
No notes defined.