Documentation
¶
Index ¶
Constants ¶
const ( FrgLime = "#93C30B" FrgMagenta = "#BD368D" FrgForest = "#004610" FrgMint = "#DBEAE5" FrgMaroon = "#4B0325" FrgBlue = "#244A66" FrgLightGray = "#F5F5F5" FrgGray = "#A6A6A6" FrgDarkGray = "#4B4B4B" FrgWhite = "#FFFFFF" FrgBlack = "#000000" )
FRG brand colors for consistent theming across applications
Variables ¶
var DefaultStyle = lipgloss.NewStyle(). Foreground(lipgloss.AdaptiveColor{Light: FrgMagenta, Dark: FrgLime})
Functions ¶
Types ¶
type InfoListItem ¶
InfoListItem is the interface for an info list. If an object satisfies this interface, a list prompt can be generated from a slice of these values. Additionally, the value returns from Info will render as markdown.
type InfoListModel ¶
type InfoListModel struct {
// contains filtered or unexported fields
}
InfoListModel contains the state of the info list prompt.
func NewInfoListModel ¶
func NewInfoListModel(input NewInfoListModelInput) (InfoListModel, error)
NewInfoListModel creates a new InfoListModel with defaults.
func (InfoListModel) Init ¶
func (m InfoListModel) Init() tea.Cmd
Init is the first command that is called when the program starts.
func (InfoListModel) Run ¶
func (m InfoListModel) Run() (InfoListItem, error)
Run starts the prompt.
type NewInfoListModelInput ¶
type NewInfoListModelInput struct {
Title string
Items []InfoListItem
NameSingular string
NamePlural string
DisableFiltering bool
DisableDetail bool
}
NewInfoListModelInput is the input for the NewInfoListModel function.
type StringItem ¶
type StringItem string
StringItem is a type that satisfies the InfoListItem interface. It's useful when you just want to display a list of strings.
func (StringItem) FilterValue ¶
func (s StringItem) FilterValue() string
FilterValue returns the StringItem's value, which is used for filtering.
func (StringItem) GetName ¶
func (s StringItem) GetName() string
GetName returns the StringItem's value, which is the value that is displayed in the list.
func (StringItem) Info ¶
func (s StringItem) Info() string
Info returns the StringItem's value, which is displayed when the user selects the detail view for the item.