prompt

package
v0.0.0-...-02e020e Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelMsg

type CancelMsg struct {
	ID int
}

type ConfirmMsg

type ConfirmMsg struct {
	ID int
}

type KeyMap

type KeyMap struct {
	Yes key.Binding
	No  key.Binding
}

func DefaultKeyMap

func DefaultKeyMap() KeyMap

func (KeyMap) FullHelp

func (m KeyMap) FullHelp() [][]key.Binding

func (KeyMap) ShortHelp

func (m KeyMap) ShortHelp() []key.Binding

type Model

type Model struct {
	Styles Styles
	KeyMap KeyMap

	Prompt string
	// contains filtered or unexported fields
}

func New

func New() Model

func (Model) ID

func (m Model) ID() int

func (Model) Update

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

func (Model) View

func (m Model) View() string

type Styles

type Styles struct {
	Frame  lipgloss.Style
	Prompt lipgloss.Style
	Help   lipgloss.Style
}

func DefaultStyles

func DefaultStyles() Styles

Jump to

Keyboard shortcuts

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