package help

import "github.com/amonks/run/internal/help"

Index

Variables

var (
	Monochrome = &Styles{
		Container: lipgloss.NewStyle(),
		Header:    lipgloss.NewStyle().Transform(strings.ToUpper),
		Keys:      lipgloss.NewStyle().Bold(true),
		Desc:      lipgloss.NewStyle().Italic(true),
	}
	Colored = &Styles{
		Container: lipgloss.NewStyle().
			Padding(2, 4),
		Header: lipgloss.NewStyle().
			Underline(true).
			Bold(true).
			MarginBottom(1).
			Foreground(color.Yellow),
		Keys: lipgloss.NewStyle().Bold(true).
			Foreground(color.XXXLight),
		Desc: lipgloss.NewStyle().Italic(true).
			Foreground(color.XXLight),
	}
)

Types

type Key

type Key struct {
	Keys string
	Desc string
}
type Menu []Section
func (m Menu) Render(styles *Styles, width, height int) string

type Section

type Section struct {
	Title string
	Keys  []Key
	// contains filtered or unexported fields
}

func (*Section) RenderInline

func (s *Section) RenderInline(styles *Styles, width, height int) string

type Styles

type Styles struct {
	Container lipgloss.Style
	Header    lipgloss.Style
	Keys      lipgloss.Style
	Desc      lipgloss.Style
}