dialog

package
v0.0.0-...-3ddbc71 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package dialog keeps helpers to create a standard dialog window.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	shared.ClickableItem
	Text string
	// contains filtered or unexported fields
}

func (*Button) Render

func (b *Button) Render() string

type Model

type Model struct {
	Title        string
	OkButton     *Button
	CancelButton *Button
	// contains filtered or unexported fields
}

Model is a dialog model.

func New

func New(title, okText, cancelText string, w, h int, okFunc, cancelFunc func() error) *Model

New creates and returns a new dialog model.

func (*Model) Init

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

func (*Model) Update

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

func (*Model) View

func (m *Model) View() string

Jump to

Keyboard shortcuts

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