xtablo-source/backend/internal/web/ui/card.templ
Arthur Belleville d056b33241 feat(01-02): add Button, Card, Badge templ components + CSS
- button.templ: Button(ButtonProps) renders <button type=...> with class
  from ui.ButtonClass(); Attrs spread for hx-* pass-through
- button.css: .ui-button base + .ui-button-solid-default-md variant
  with non-nested :hover and :focus-visible (Codex concern #7)
- card.templ: Card(attrs) accepts children via templ child syntax
- card.css: slate-50 panel, slate-200 border
- badge.templ: Badge(BadgeProps) renders <span class=...>
- badge.css: info / success / danger variants (warning deferred)
2026-05-14 18:46:42 +02:00

11 lines
349 B
Text

package ui
// Card is a slate-50 panel with a slate-200 border. Children are rendered
// inside via templ's child-content syntax: `@ui.Card(nil) { <p>...</p> }`.
//
// `attrs` is a pass-through for arbitrary attributes (id, data-*, hx-*).
templ Card(attrs templ.Attributes) {
<section class="ui-card" { attrs... }>
{ children... }
</section>
}