Files
LazyPM/pkg/web/components/base/table.templ
Moira Daniella A Sebastian 96291b7a94 Added issues dashboard
2026-02-23 19:48:10 +01:00

29 lines
526 B
Plaintext

package base
templ Table(headers []templ.Component, rows []templ.Component, attrs templ.Attributes) {
<div class="overflow-x-auto">
<table { attrs... } class="table table-sm">
<thead>
<tr>
for _, header := range headers {
<th>
@header
</th>
}
</tr>
</thead>
<tbody>
for _, trow := range rows {
@trow
}
</tbody>
</table>
</div>
}
// Component to use as plain text when
// templ.Component is used as argument
templ PlainText(content string) {
{ content }
}