feat: add navigation and window size handlers with corresponding tests
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"github.com/StevanFreeborn/term-tier/internal/state"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
)
|
||||
|
||||
type WinSizeMsgHandler interface {
|
||||
Match(s state.State, msg tea.WindowSizeMsg) bool
|
||||
Handle(s state.State, msg tea.WindowSizeMsg) tea.Cmd
|
||||
}
|
||||
|
||||
func GetAllWinSizeHandlers() []WinSizeMsgHandler {
|
||||
return []WinSizeMsgHandler{
|
||||
NewTrackWindowSizeHandler(),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user