menu

package
v0.0.0-...-0fd1ed7 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultItemDelegate

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

func NewDefaultDelegate

func NewDefaultDelegate(color lipgloss.AdaptiveColor) DefaultItemDelegate

func (DefaultItemDelegate) Height

func (d DefaultItemDelegate) Height() int

func (DefaultItemDelegate) Render

func (d DefaultItemDelegate) Render(w io.Writer, m list.Model, index int, listItem list.Item)

func (DefaultItemDelegate) Spacing

func (d DefaultItemDelegate) Spacing() int

func (DefaultItemDelegate) Update

func (d DefaultItemDelegate) Update(msg tea.Msg, m *list.Model) tea.Cmd

type Item

type Item struct {
	Title     string
	Component tea.Model
}

func (Item) FilterValue

func (i Item) FilterValue() string

type Model

type Model struct {
	SubViews map[string]tea.Model
	// contains filtered or unexported fields
}

func New

func New(title string, readme string, items []Item, delegate DefaultItemDelegate, defaultWidth, listHeight int) (Model, error)

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

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