confirmdialog

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: Apache-2.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 Model

type Model struct {
	Visible         bool
	Message         string
	Width           int
	Height          int
	ErrorMode       bool   // If true, shows "Error" title and dismiss-only
	InfoMode        bool   // If true, shows "Info" title and dismiss-only
	CheckboxLabel   string // If non-empty, shows a checkbox with this label
	CheckboxChecked bool   // State of the checkbox
}

func New

func New(width, height int) *Model

func (*Model) Hide

func (m *Model) Hide() *Model

func (*Model) Init

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

func (*Model) Show

func (m *Model) Show(msg string) *Model

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

func (*Model) WithMessage

func (m *Model) WithMessage(msg string) *Model

type ResultMsg

type ResultMsg struct {
	Confirmed       bool
	CheckboxChecked bool // State of the optional checkbox
}

Jump to

Keyboard shortcuts

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