Skip to content

Commit

Permalink
refactor: field -> form
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed Oct 20, 2023
1 parent cceed27 commit ce34712
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 18 deletions.
18 changes: 0 additions & 18 deletions field.go

This file was deleted.

15 changes: 15 additions & 0 deletions form.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ func NewForm(groups ...*Group) *Form {
}
}

// Field is a form field.
type Field interface {
// Bubble Tea Model
Init() tea.Cmd
Update(tea.Msg) (tea.Model, tea.Cmd)
View() string

// Bubble Tea Events
Blur() tea.Cmd
Focus() tea.Cmd

// Accessible Prompt (non-redraw)
Run()
}

type nextGroupMsg struct{}
type prevGroupMsg struct{}

Expand Down

0 comments on commit ce34712

Please sign in to comment.