This commit is contained in:
Martin Pander
2026-03-03 21:11:58 +01:00
parent f6ce2e30dc
commit 6f77b03555
8 changed files with 1409 additions and 295 deletions

View File

@@ -0,0 +1,34 @@
package components
import (
tea "charm.land/bubbletea/v2"
"charm.land/huh/v2"
)
type Page struct {
form huh.Form
}
type MultiPageForm struct {
// pages []Page
form huh.Form
}
func NewMultiPageForm(form huh.Form) *MultiPageForm {
return &MultiPageForm{
form: form,
}
}
func (f *MultiPageForm) Init() tea.Cmd {
return nil
}
func (f *MultiPageForm) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
_, cmd := f.form.Update(msg)
return f, cmd
}
func (f *MultiPageForm) View() tea.View {
return tea.NewView(f.form.View())
}