header

package
v0.0.47 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HeaderModel

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

HeaderModel is the model for a header. The header displays state information such as breadcrumbs for the selected book.

func InitialModel

func InitialModel(name string, title string) HeaderModel

InitialModel builds the model.

func (HeaderModel) Busy

func (m HeaderModel) Busy() bool

Busy returns whether the writer is busy or not.

func (HeaderModel) Init

func (m HeaderModel) Init() tea.Cmd

Init initializes the model.

func (*HeaderModel) Resize

func (m *HeaderModel) Resize(width int)

Resize changes the size of the header.

func (*HeaderModel) SetBreadcrumbs

func (m *HeaderModel) SetBreadcrumbs(breadcrumbs string)

SetBreadcrumbs sets the bread crumbs displayed in the header.

func (*HeaderModel) SetBusy

func (m *HeaderModel) SetBusy()

SetBusy denotes that the writer is busy.

func (*HeaderModel) SetFree

func (m *HeaderModel) SetFree()

SetBusy denotes that the writer is free.

func (HeaderModel) Update

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

Update handles a message.

func (HeaderModel) View

func (m HeaderModel) View() string

View renders the model.

Jump to

Keyboard shortcuts

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