Files
tasksquire/internal/components/multiPageForm.go
Martin Pander 6f77b03555 WIP
2026-05-09 23:41:46 +02:00

35 lines
532 B
Go

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