modal

package
v0.7.8 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Modal struct {
	// contains filtered or unexported fields
}

func NewModal

func NewModal(baseStyle lipgloss.Style, modes []*Mode, exitModeKey key.Binding) *Modal

func (*Modal) Init

func (mdl *Modal) Init() tea.Cmd

func (*Modal) Update

func (mdl *Modal) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Modal) View

func (mdl *Modal) View() string

type Mode

type Mode struct {
	EnterModeKey key.Binding
	Name         string
	Component    tea.Model
}

type State

type State int
const (
	SelectingMode State = iota
	UsingMode
)

Jump to

Keyboard shortcuts

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