helpers

package
v0.0.0-...-191fbf7 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(models ...tea.Model) tea.Cmd

func NewTextBox

func NewTextBox(text string, style, scrollStyle lipgloss.Style) tea.Model

func PassMsg

func PassMsg(msg tea.Msg, models ...Model) tea.Cmd

func PassMsgs

func PassMsgs(sizes ...ModelWithMsg) tea.Cmd

Types

type BoxWithBorders

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

func NewBox

func NewBox(model BoxedModel, theme configuration.Theme) BoxWithBorders

func (BoxWithBorders) Init

func (model BoxWithBorders) Init() tea.Cmd

func (BoxWithBorders) Update

func (model BoxWithBorders) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (BoxWithBorders) View

func (model BoxWithBorders) View() string

type BoxedModel

type BoxedModel interface {
	tea.Model

	Legends() []string
	Labels() []string
	Focus() bool
	UpdateAsBoxed(msg tea.Msg) (BoxedModel, tea.Cmd)
}

type Model

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

func NewModel

func NewModel(model tea.Model, setter func(tea.Model)) Model

func (Model) WithMsg

func (base Model) WithMsg(msg tea.Msg) ModelWithMsg

type ModelWithMsg

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

type Table

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

func NewTable

func NewTable(getSizes func(int) []int, theme configuration.Theme) Table

func (Table) Render

func (table Table) Render(headerCells []string, rowCells [][]string, width, selected, scrollPosition, height int) string

type TextBox

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

func (TextBox) Init

func (TextBox) Init() tea.Cmd

func (TextBox) Update

func (model TextBox) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (TextBox) View

func (model TextBox) View() string

type UpdateLabelsMsg

type UpdateLabelsMsg struct {
	Labels []string
}

Jump to

Keyboard shortcuts

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