xtablo-source/backend/internal/web/ui/empty_state.templ
Arthur Belleville fbdf188f5f
feat(13-04): port modal, empty-state, table components with CSS and templ (GREEN)
- 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
2026-05-16 14:05:11 +02:00

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>
}