infobar

package
v0.0.0-...-63b292e Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DEFAULT_MESSAGE = "--"

Variables

This section is empty.

Functions

func PromptAnswerCmd

func PromptAnswerCmd(id string, value string, cancelled bool) tea.Cmd

PromptAnswerCmd is used to send the answer from the prompt

func PromptAskCmd

func PromptAskCmd(id string, placeholder string, validator func(string) error) tea.Cmd

Types

type Infobar

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

func New

func New() Infobar

func (*Infobar) Init

func (m *Infobar) Init() tea.Cmd

Init initializes the model. It must be called.

func (Infobar) Update

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

Update handles messages from the program.

func (Infobar) View

func (m Infobar) View() string

type PromptAnswerMsg

type PromptAnswerMsg struct {
	ID        string
	Message   string
	Cancelled bool
}

PromptAnswerMsg is sent when the user answers the prompt

func (PromptAnswerMsg) String

func (m PromptAnswerMsg) String() string

String returns the message as a string

type PromptAskMsg

type PromptAskMsg struct {
	// The message to display
	ID          string
	Placeholder string
	Validator   func(string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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