1
0
Fork 0
forked from goffee/core
core/template/components/content_dropdown.html

16 lines
663 B
HTML
Raw Permalink Normal View History

2024-10-15 17:07:18 -04:00
{{define "content_dropdown_item"}}
2024-10-29 13:30:05 -04:00
<li><a {{ if .ID }}id="{{.ID}}"{{end}} class="dropdown-item {{if eq .IsActive true}}active{{end}} {{if eq .IsDisabled true}}disabled{{end}}" href="{{.Link}}">{{.Text}}</a></li>
{{end}}
2024-10-15 17:07:18 -04:00
{{define "content_dropdown"}}
<div class="dropdown">
<button class="btn btn-{{.TypeClass}} dropdown-toggle {{if eq .IsDisabled true}}disabled{{end}}" type="button" data-bs-toggle="dropdown" aria-expanded="false">
{{.Label}}
</button>
<ul class="dropdown-menu">
{{ range .Items}}
2024-10-15 17:07:18 -04:00
{{template "content_dropdown_item" .}}
{{end}}
</ul>
</div>
{{end}}