1
0
Fork 0
forked from goffee/core

component list

This commit is contained in:
Diana 2024-10-15 16:09:31 -05:00
parent 458ad520ca
commit bf84e14bb1
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,19 @@
package components
type ContentList struct {
Items []ContentListItem
}
type ContentListItem struct {
Text string
Description string
EndElement string
//Link string
TypeClass string // primary, secondary, success, danger, warning, info, light, dark
IsDisabled bool
//IsActive bool
}
//link
//border
// badge

View file

@ -0,0 +1,14 @@
{{define "content_list"}}
<ul class="list-group">
{{ range .Items}}
<li class="list-group-item text-wrap {{if eq .IsDisabled true}}disabled{{end}} {{if .TypeClass}}list-group-item-{{.TypeClass}}{{end}}"
{{if eq .IsDisabled true}}aria-disabled="true"{{end}}
><div class="d-flex justify-content-between lh-sm"><p class="mb-1">{{.Text}}</p><span class="text-body-secondary ms-5">{{.EndElement}}</span></div>
<small>{{.Description}}</small>
</li>
{{end}}
</ul>
{{end}}