dialog

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DialogResultMsg

type DialogResultMsg struct {
	ID        string
	Confirmed bool
}

DialogResultMsg is emitted when a dialog is closed.

type Kind

type Kind int

Kind represents the type of dialog.

Two of them, since the picker took the third. A prompt collected text into a centred box with an OK button, which is the idiom TUI 2.0 replaced everywhere else; internal/ui/components/attach is what asks for a path now. What is left is a yes/no and an acknowledgement — genuinely two-button and one-button questions, which is what a modal is for.

const (
	KindConfirm Kind = iota
	KindAlert
)

type Model

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

Model is a modal dialog component.

func NewAlert

func NewAlert(r theme.Roles, id, title, message string) Model

NewAlert creates an alert dialog.

func NewConfirm

func NewConfirm(r theme.Roles, id, title, message string) Model

NewConfirm creates a confirmation dialog.

func (Model) IsVisible

func (m Model) IsVisible() bool

IsVisible returns whether the dialog is visible.

func (Model) Update

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

Update handles messages.

func (Model) View

func (m Model) View() string

View renders the dialog.

Jump to

Keyboard shortcuts

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