xtablo-source/backend/internal/web/ui/modal.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
484 B
Text

package ui
type ModalProps struct {
Title string
Body templ.Component
Actions templ.Component
}
templ Modal(props ModalProps) {
<div class="ui-modal-backdrop">
<div class="ui-modal-panel">
<div class="ui-modal-header">
<h2>{ props.Title }</h2>
</div>
if props.Body != nil {
<div class="ui-modal-body">
@props.Body
</div>
}
if props.Actions != nil {
<div class="ui-modal-actions">
@props.Actions
</div>
}
</div>
</div>
}