v4/templates/components/role.html
2025-04-05 22:02:17 -07:00

10 lines
403 B
HTML

{{ $for := printf "category-%s_role-%s" .CategoryID .ID }}
<div
class="role"
style="--role-color: {{.Colors.Main}}; --contrast-color: var({{if .Colors.IsDark}}--grey600{{else}}--grey100{{end}});"
data-testid="role-{{.ID}}"
>
<input type="{{.InputType}}" id="{{$for}}" {{if eq .InputType
"radio"}}name="category_group_{{.CategoryID}}"{{end}} />
<label for="{{$for}}">{{.Name}}</label>
</div>