tabs

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 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 {
	ActiveStyle   lipgloss.Style
	InactiveStyle lipgloss.Style
	// contains filtered or unexported fields
}

Model representing the tabs bubble.

func New

func New(tabs []string) Model

New creates a tabs Model. TODO: pass in initial width.

func (Model) GetActiveIndex

func (m Model) GetActiveIndex() int

GetActiveIndex returns the current active index.

func (Model) Height

func (m Model) Height() int

Height returns the height of this bubble.

func (Model) Init

func (m Model) Init() tea.Cmd

Init is part of the tea.Model interface.

func (*Model) SetActiveIndex

func (m *Model) SetActiveIndex(i int)

SetActiveIndex sets the current active index.

func (Model) Update

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

Update is part of the tea.Model interface.

func (Model) View

func (m Model) View() string

View is part of the tea.Model interface.

Jump to

Keyboard shortcuts

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