base

package
v0.0.0-...-a0a6b0b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2023 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Back

func Back() tea.Msg

func Err

func Err(err error) tea.Cmd

func PushState

func PushState(state State) tea.Cmd

Types

type Model

type Model interface {
	tea.Model

	Context() context.Context
	AvailableSize() Size
}

type MsgBack

type MsgBack struct{}

type Size

type Size struct {
	Width, Height int
}

type State

type State interface {
	Intermediate() bool
	Backable() bool

	KeyMap() help.KeyMap

	Title() Title
	Subtitle() string
	Status() string

	Resize(size Size) tea.Cmd

	Update(model Model, msg tea.Msg) tea.Cmd
	View(model Model) string
	Init(model Model) tea.Cmd
}

type Styles

type Styles struct {
	Title,
	TitleBar,
	Subtitle,
	HelpBar,
	Selection lipgloss.Style
}

func DefaultStyles

func DefaultStyles() Styles

type Title

type Title struct {
	Text                   string
	Background, Foreground lipgloss.Color
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL