Documentation
¶
Index ¶
Constants ¶
const ( HexWhite = "#FFFFFF" HexBrightPurple = "#B198E5" HexBrightGreen = "#3CCE92" DefaultWidth = 30 ListHeight = 15 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the main application struct that holds the items to be displayed
type Item ¶
type Item string
Item represents a single item in the list
func (Item) FilterValue ¶
FilterValue returns the string representation of the item
type ItemDelegate ¶
type ItemDelegate struct{}
ItemDelegate is a custom delegate for rendering items in the list
func NewItemDelegate ¶
func NewItemDelegate() ItemDelegate
NewItemDelegate creates a new empty instance of ItemDelegate
func (ItemDelegate) Height ¶
func (d ItemDelegate) Height() int
Height defines the height of the item in the list
func (ItemDelegate) Render ¶
Render is the main rendering function for the item delegate. It determines how the item should be displayed based on its index.
func (ItemDelegate) Spacing ¶
func (d ItemDelegate) Spacing() int
Spacing defines the spacing between items in the list
type ListStyles ¶
ListStyles holds the styles for the list (ItemDelegade) component
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model controls the state of the TUI application
func NewModel ¶
NewModel creates a new instance of the Model with the provided list and target variable
type RenderingStyles ¶
type RenderingStyles struct {
Item lipgloss.Style
SelectedItem lipgloss.Style
SelectedResult lipgloss.Style
QuitText lipgloss.Style
PlainText lipgloss.Style
TargetType lipgloss.Style
}
RenderingStyles holds the styles for rendering different components
type StyleSet ¶
type StyleSet struct {
Rendering RenderingStyles
List ListStyles
}
StyleSet is just a container for all the styles
func NewStyleSet ¶
func NewStyleSet() *StyleSet
NewStyleSet creates a new StyleSet with default styles