Documentation
¶
Overview ¶
Package help implements a help bubble which can be used to display help information such as keymaps.
Index ¶
- type Entry
- type Model
- func (m *Model) GotoTop()
- func (m *Model) SetBorderColor(color lipgloss.AdaptiveColor)
- func (m *Model) SetBorderless(borderless bool)
- func (m *Model) SetIsActive(active bool)
- func (m *Model) SetSize(w, h int)
- func (m *Model) SetTitleColor(color TitleColor)
- func (m Model) Update(msg tea.Msg) (Model, tea.Cmd)
- func (m Model) View() string
- type TitleColor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
Viewport viewport.Model
Entries []Entry
BorderColor lipgloss.AdaptiveColor
Title string
TitleColor TitleColor
Active bool
Borderless bool
}
Model represents the properties of a help bubble.
func New ¶
func New( active, borderless bool, title string, titleColor TitleColor, borderColor lipgloss.AdaptiveColor, entries []Entry, ) Model
New creates a new instance of a help bubble.
func (*Model) SetBorderColor ¶
func (m *Model) SetBorderColor(color lipgloss.AdaptiveColor)
SetBorderColor sets the current color of the border.
func (*Model) SetBorderless ¶
SetBorderless sets weather or not to show the border.
func (*Model) SetIsActive ¶
SetIsActive sets if the bubble is currently active.
func (*Model) SetTitleColor ¶
func (m *Model) SetTitleColor(color TitleColor)
SetTitleColor sets the color of the title.
type TitleColor ¶
type TitleColor struct {
Background lipgloss.AdaptiveColor
Foreground lipgloss.AdaptiveColor
}
Click to show internal directories.
Click to hide internal directories.