common

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MainStyles = DefaultStyles()

Functions

func ActiveRowStyle

func ActiveRowStyle() lipgloss.Style

func DefaultRowStyle

func DefaultRowStyle() lipgloss.Style

func DisabledRowStyle

func DisabledRowStyle() lipgloss.Style

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 PendingRowStyle

func PendingRowStyle() lipgloss.Style

func VerticalLine

func VerticalLine(state State) string

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

Types

type Model

type Model struct {
}

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 {
	Window,
	Cursor,
	Wrap,
	Paragraph,
	Error,
	Prompt,
	FocusedPrompt,
	SelectionMarker,
	SelectedMenuItem,
	SuccessText,
	InfoText,
	ErrorText,
	Checkmark 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