tab

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTab

func NewTab(title string, tabType Type) 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 {
	Title string
	Type  Type
}

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

type Tab

type Tab interface {
	// general fields
	Title() string
	Type() Type
	SetWidth(int) Tab
	SetHeight(int) Tab
	ShowHelp() string

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

Tab is an interface outlining the methods that a tab should implement a bubbletea models' methods and also some more

type Type

type Type int
const (
	Welcome Type = iota + 1
	Feed
	Category
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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