xtablo-source/deprecated/internal/web/ui/modal.templ
Arthur Belleville 5d0c201e86
Some checks failed
backend-ci / Backend tests (pull_request) Failing after 53s
backend-ci / Backend tests (push) Failing after 1s
Some work
2026-05-23 17:26:01 +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>
}