style

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Title         = lipgloss.NewStyle().MarginLeft(2)
	Item          = lipgloss.NewStyle().PaddingLeft(4)
	SelectedItem  = lipgloss.NewStyle().PaddingLeft(2).Foreground(color.Focused)
	Pagination    = list.DefaultStyles().PaginationStyle.PaddingLeft(4)
	Help          = list.DefaultStyles().HelpStyle.PaddingLeft(4).PaddingBottom(1)
	PrintOnlyList = lipgloss.NewStyle().PaddingLeft(4)
	List          = lipgloss.NewStyle().BorderForeground(color.Border).BorderStyle(lipgloss.NormalBorder()).Padding(1, 0, 1, 0)
	ListDetails   = lipgloss.NewStyle().PaddingLeft(6)
	InputField    = lipgloss.NewStyle().BorderForeground(color.Border).BorderStyle(lipgloss.NormalBorder()).Padding(1).Width(80)
	Focused       = lipgloss.NewStyle().Foreground(color.Focused)
	None          = lipgloss.NewStyle()
	Error         = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#FF0000"))

	Comment    = lipgloss.NewStyle().BorderForeground(color.Border).BorderStyle(lipgloss.RoundedBorder()).Padding(1)
	Discussion = Comment.Copy().PaddingRight(0)
)

Functions

func FormatQuitText

func FormatQuitText(str string) string

FormatQuitText formats and returns the passed string with the style.quitText style. Word wrap is determined using term.GetSize.

func PrintErrAndExit

func PrintErrAndExit(str string)

PrintErrAndExit formats the passed string using FormatQuitText, prints it to Stderr and calls os.Exit(1).

func UpdateColors

func UpdateColors()

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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