add goshipit a component library fro templ

This commit is contained in:
Robin Olsen
2026-02-03 13:13:27 +01:00
parent 0da33876e1
commit 7333d5eb2b
12 changed files with 1703 additions and 1 deletions

View File

@@ -0,0 +1,28 @@
package base
templ Table(headers []templ.Component, rows []templ.Component, attrs templ.Attributes) {
<div class="overflow-x-auto">
<table { attrs... } class="table">
<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 }
}