- modal.css + modal.templ: backdrop/panel structure, Title/Body/Actions props - empty-state.css + empty_state.templ: dashed border, nil-guarded Icon/Action - table.css + table.templ: ui-table-shell wrapper, Head/Body typed props - All 6 TestModal/TestEmptyState/TestTable tests pass; full suite green
27 lines
581 B
Text
27 lines
581 B
Text
package ui
|
|
|
|
type EmptyStateProps struct {
|
|
Title string
|
|
Description string
|
|
Icon templ.Component
|
|
Action templ.Component
|
|
}
|
|
|
|
templ EmptyState(props EmptyStateProps) {
|
|
<section class="ui-empty-state">
|
|
if props.Icon != nil {
|
|
<div class="ui-empty-state-icon">
|
|
@props.Icon
|
|
</div>
|
|
}
|
|
<h3 class="ui-empty-state-title">{ props.Title }</h3>
|
|
if props.Description != "" {
|
|
<p class="ui-empty-state-description">{ props.Description }</p>
|
|
}
|
|
if props.Action != nil {
|
|
<div class="ui-empty-state-action">
|
|
@props.Action
|
|
</div>
|
|
}
|
|
</section>
|
|
}
|