budgit/internal/ui/components/button/submit.templ
2026-02-14 23:12:43 +00:00

22 lines
456 B
Text

package button
import "git.juancwu.dev/juancwu/budgit/internal/ui/components/icon"
templ Submit(props ...Props) {
{{ var p Props }}
if len(props) > 0 {
{{ p = props[0] }}
}
if p.Type == "" {
{{ p.Type = TypeSubmit }}
}
{{ p.Class = p.Class + " htmx-submit-btn" }}
@Button(p) {
<span class="btn-label contents">
{ children... }
</span>
<span class="btn-spinner">
@icon.LoaderCircle(icon.Props{Class: "animate-spin"})
</span>
}
}