confirm

package
v3.82.10 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Confirm

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

func New

func New(c common.Common, msg string, opts ...ConfirmOpt) Confirm

func (Confirm) Init

func (Confirm) Init() tea.Cmd

func (Confirm) Update

func (c Confirm) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Confirm) View

func (c Confirm) View() string

type ConfirmOpt

type ConfirmOpt func(*Confirm)

func WithAffirmativeMessage

func WithAffirmativeMessage(msg string) ConfirmOpt

func WithAffirmativeTransition

func WithAffirmativeTransition(m tea.Model, cmd tea.Cmd) ConfirmOpt

func WithDefault

func WithDefault(choice bool) ConfirmOpt

func WithNegativeMessage

func WithNegativeMessage(msg string) ConfirmOpt

func WithNegativeTransition

func WithNegativeTransition(m tea.Model, cmd tea.Cmd) ConfirmOpt

type Msg

type Msg struct {
	Choice  bool
	Message string
}

Jump to

Keyboard shortcuts

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