tab

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTab

func NewTab(sender Tab, title string) tea.Cmd

NewTab returns a tea.Cmd which sends a message to the main model to create a new tab

Types

type NewTabMessage

type NewTabMessage struct {
	Sender Tab
	Title  string
}

NewTabMessage is a tea.Msg that signals that a new tab should be created

type Style added in v1.2.0

type Style struct {
	Color lipgloss.Color
	Icon  string
	Name  string
}

Style is a struct that holds the style of a tab

type Tab

type Tab interface {
	Title() string
	Style() Style
	SetSize(width, height int) Tab
	GetKeyBinds() []key.Binding

	Init() tea.Cmd
	Update(msg tea.Msg) (Tab, tea.Cmd)
	View() string
}

Tab is an interface outlining the methods that a tab should implement including bubbletea's model methods

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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