tui

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEditor

func NewEditor(title string, initialText string, onSave OnSaveCallback) error

Types

type EditorModel

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

func (EditorModel) Init

func (m EditorModel) Init() tea.Cmd

func (EditorModel) Update

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

func (EditorModel) View

func (m EditorModel) View() string

type ListModel

type ListModel struct {
	Selected list.Item
	// contains filtered or unexported fields
}

func List

func List(items []list.Item, onDelete OnDeleteCallback) (ListModel, error)

func (ListModel) Init

func (m ListModel) Init() tea.Cmd

func (ListModel) Update

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

func (ListModel) View

func (m ListModel) View() string

type OnDeleteCallback

type OnDeleteCallback func(item list.Item) error

type OnSaveCallback

type OnSaveCallback func(string) error

Jump to

Keyboard shortcuts

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