spacetea/parent.go

20 lines
349 B
Go
Raw Normal View History

2022-05-19 12:58:37 -04:00
package main
import tea "github.com/charmbracelet/bubbletea"
type parent struct {
current tea.Model
}
func (m parent) Init() tea.Cmd {
return tea.Batch(tea.EnterAltScreen, m.current.Init())
2022-05-19 12:58:37 -04:00
}
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()
}