Skip to content

Files

Latest commit

d82c0d5 · Mar 12, 2024

History

History
23 lines (17 loc) · 482 Bytes

README.md

File metadata and controls

23 lines (17 loc) · 482 Bytes

TemplUI

Table

import (
    "github.com/iamajoe/templui/table"
)

@table.New(
  table.WithID("zing"),
  table.WithClasses("border border-slate-200"),
  table.WithAttributes(map[string]any{"data-zed": "zung"}),
  table.WithHeader("ID", "Status"),
  table.WithHeaderClasses("bg-slate-50 border-b border-slate-800"),
  table.WithRows([]string{"1", "<span class=\"text-red-500\">Rejected</span>"}),
  table.WithRowClasses("border-b border-slate-800"),
)