spacetea/parent.go
2022-05-19 12:58:37 -04:00

20 lines
349 B
Go

package main
import tea "github.com/charmbracelet/bubbletea"
type parent struct {
current tea.Model
}
func (m parent) Init() tea.Cmd {
return tea.Batch(m.current.Init(), tea.EnterAltScreen)
}
func (m parent) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
return m.current.Update(msg)
}
func (m parent) View() string {
return m.current.View()
}