package main // techSpecComponent renders the tech-spec table with right-aligned mono numerals // and hairline row rules. templ techSpecComponent(data TechSpecData) {
if data.Caption != "" {

{ data.Caption }

} if len(data.Rows) == 0 { } else { for i, row := range data.Rows { @techSpecRow(row, i == len(data.Rows)-1) } }
No spec rows yet. --
} // techSpecRow renders a single row. Last-row check controls whether to drop // the bottom hairline. templ techSpecRow(row TechSpecRow, last bool) { { row.Label } { row.Value } { row.Unit } } func rowBorderClass(last bool) string { if last { return "" } return "hairline-b" }