common

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CancelButtonView

func CancelButtonView(focused bool, defaultButton bool) string

CancelButtonView returns a button reading "Cancel.".

func HelpView

func HelpView(sections ...string) string

HelpView renders text intended to display at help text, often at the bottom of a view.

func KeyValueView

func KeyValueView(stuff ...string) string

KeyValueView renders key-value pairs.

func NewSpinner

func NewSpinner() spinner.Model

NewSpinner returns a spinner model.

func OKButtonView

func OKButtonView(focused bool, defaultButton bool) string

OKButtonView returns a button reading "OK".

func VerticalLine

func VerticalLine(state State) string

VerticalLine return a vertical line colored according to the given state.

Types

type State

type State int

State is a general UI state used to help style components.

const (
	StateNormal State = iota
	StateSelected
	StateActive
	StateSpecial
	StateDeleting
)

UI states.

type Styles

type Styles struct {
	Cursor,
	Wrap,
	Paragraph,
	Keyword,
	Code,
	Subtle,
	Error,
	Prompt,
	FocusedPrompt,
	Note,
	NoteDim,
	Delete,
	DeleteDim,
	Label,
	LabelDim,
	ListKey,
	ListDim,
	InactivePagination,
	SelectionMarker,
	SelectedMenuItem,
	Checkmark,
	App lipgloss.Style
}

func DefaultStyles

func DefaultStyles() Styles

Jump to

Keyboard shortcuts

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