confirm

package
v0.9.5 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type COption

type COption func(confirm *Confirm)

func WithTitle

func WithTitle(title string) COption

type Confirm

type Confirm struct {
	Program *tea.Program
	// contains filtered or unexported fields
}

func NewConfirm

func NewConfirm(opts ...COption) (cfm *Confirm)

func (*Confirm) Result

func (that *Confirm) Result() bool

func (*Confirm) Run

func (that *Confirm) Run()

func (*Confirm) SetProgramOpts

func (cf *Confirm) SetProgramOpts(opts ...tea.ProgramOption)

type ConfirmModel

type ConfirmModel struct {
	Title string
	Ok    bool
	// contains filtered or unexported fields
}

func (*ConfirmModel) Init

func (that *ConfirmModel) Init() tea.Cmd

func (*ConfirmModel) Result

func (that *ConfirmModel) Result() bool

func (*ConfirmModel) Update

func (that *ConfirmModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ConfirmModel) View

func (that *ConfirmModel) View() string

Jump to

Keyboard shortcuts

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