added table components
This commit is contained in:
parent
cce768dad8
commit
90f847b757
37
components/bulma/table.templ
Normal file
37
components/bulma/table.templ
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
package bulma
|
||||||
|
|
||||||
|
// Creates a <table> that accepts children
|
||||||
|
templ Table(){
|
||||||
|
<table class="table">
|
||||||
|
{ children... }
|
||||||
|
</table>
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a <thead> that accepts children.
|
||||||
|
templ TableHeader() {
|
||||||
|
<thead>{ children... }</thead>
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a <tf> that accepts children.
|
||||||
|
templ TableRow() {
|
||||||
|
<tr>{ children... }</tr>
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a <th> and writes the given value
|
||||||
|
templ TableHeaderData(value string) {
|
||||||
|
<th>{ value }</th>
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a <th> that allows you to also add a tooltip value
|
||||||
|
templ TableHeaderDataToolTip(value, tooltip string) {
|
||||||
|
<th><abbr title={ tooltip }>{ value }</abbr></th>
|
||||||
|
}
|
||||||
|
|
||||||
|
// Creates a <td> that accepts children.
|
||||||
|
templ TableDataChildren() {
|
||||||
|
<td>{ children... }</td>
|
||||||
|
}
|
||||||
|
|
||||||
|
templ TableData(value string) {
|
||||||
|
<td>{ value }</td>
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user