buttonbar

package
v0.69.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package buttonbar provides a bubbletea component that displays an inline list of buttons.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActiveBtnMsg

type ActiveBtnMsg int

ActiveBtnMsg is a message that contains the index of the current active button.

type ButtonBar

type ButtonBar struct {
	SeparatorStyle lipgloss.Style
	FocusedStyle   lipgloss.Style
	BlurredStyle   lipgloss.Style
	// contains filtered or unexported fields
}

ButtonBar is bubbletea component that displays an inline list of buttons.

func New

func New(buttons []string) *ButtonBar

New creates a new ButtonBar component.

func (*ButtonBar) Init

func (b *ButtonBar) Init() tea.Cmd

Init implements tea.Model.

func (*ButtonBar) Update

func (b *ButtonBar) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update implements tea.Model.

func (*ButtonBar) View

func (b *ButtonBar) View() string

View implements tea.Model.

type SelectBtnMsg

type SelectBtnMsg int

SelectBtnMsg is a message that contains the index of the button to select.

Jump to

Keyboard shortcuts

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