button

package
v0.0.0-...-17ac522 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: MIT Imports: 3 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 {
	// contains filtered or unexported fields
}

Model is the button model struct

func New

func New(name string) Model

New returns a button model with default parameters

func (Model) Focused

func (m Model) Focused() bool

Focused returns the focus state of the button

func (*Model) SetFocus

func (m *Model) SetFocus(focus bool)

SetFocus changes the focus state of the button

func (*Model) SetName

func (m *Model) SetName(name string)

SetName changes the visible display of the button

func (Model) Update

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

Update contains the button's update loop, which currently does nothing

func (Model) View

func (m Model) View() string

View renders the button into a text string

Jump to

Keyboard shortcuts

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