Documentation
¶
Index ¶
- Variables
- func FormatBold(text string) string
- func FormatError(msg string) string
- func FormatInfo(msg string) string
- func FormatMuted(text string) string
- func FormatRocket(msg string) string
- func FormatSuccess(msg string) string
- func FormatTitle(title string) string
- func FormatWarning(msg string) string
- func RenderKeyValue(key, value string) string
- func RenderSimpleList(items []string) string
- type Table
- type TableColumn
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Color palette using terminal colors for consistency ColorSuccess = lipgloss.AdaptiveColor{Light: "2", Dark: "2"} // Green ColorError = lipgloss.AdaptiveColor{Light: "1", Dark: "1"} // Red ColorPrimary = lipgloss.AdaptiveColor{Light: "5", Dark: "5"} // Magenta/Purple ColorInfo = lipgloss.AdaptiveColor{Light: "6", Dark: "6"} // Cyan ColorMuted = lipgloss.AdaptiveColor{Light: "8", Dark: "8"} // Gray ColorWarning = lipgloss.AdaptiveColor{Light: "3", Dark: "3"} // Yellow ColorAccent = lipgloss.AdaptiveColor{Light: "4", Dark: "4"} // Blue ColorDefault = lipgloss.AdaptiveColor{Light: "7", Dark: "7"} // White // Base styles StyleSuccess = lipgloss.NewStyle(). Foreground(ColorSuccess). Bold(true) StyleError = lipgloss.NewStyle(). Foreground(ColorError). Bold(true) StylePrimary = lipgloss.NewStyle(). Foreground(ColorPrimary). Bold(true) StyleInfo = lipgloss.NewStyle(). Foreground(ColorInfo) StyleMuted = lipgloss.NewStyle(). Foreground(ColorMuted) StyleWarning = lipgloss.NewStyle(). Foreground(ColorWarning). Bold(true) StyleAccent = lipgloss.NewStyle(). Foreground(ColorAccent) // Component styles StyleTitle = lipgloss.NewStyle(). Foreground(ColorPrimary). Bold(true). Underline(true) StyleHeader = lipgloss.NewStyle(). Foreground(ColorPrimary). Bold(true) StyleSubtle = lipgloss.NewStyle(). Foreground(ColorMuted). Italic(true) StyleBold = lipgloss.NewStyle(). Bold(true) // Table styles StyleTableHeader = lipgloss.NewStyle(). Foreground(ColorPrimary). Bold(true). Align(lipgloss.Left) StyleTableRow = lipgloss.NewStyle(). Foreground(ColorDefault) StyleTableRowAlt = lipgloss.NewStyle(). Foreground(ColorDefault). Faint(true) StyleTableBorder = lipgloss.NewStyle(). Foreground(ColorMuted) // Status icons IconSuccess = "✔" IconError = "✘" IconRocket = "🚀" IconInfo = "ℹ" IconWarning = "⚠" IconNote = "📝" IconBuild = "🔨" IconTag = "🏷" )
Functions ¶
func FormatError ¶
FormatError returns an error message with icon
func FormatRocket ¶
FormatRocket returns a rocket message (for exciting actions)
func FormatSuccess ¶
FormatSuccess returns a success message with icon
func FormatWarning ¶
FormatWarning returns a warning message with icon
func RenderKeyValue ¶
RenderKeyValue renders a key-value pair
func RenderSimpleList ¶
RenderSimpleList renders a simple bulleted list
Types ¶
type Table ¶
type Table struct {
Columns []TableColumn
Rows [][]string
}
Table represents a data table
func NewTable ¶
func NewTable(columns []TableColumn) *Table
NewTable creates a new table with specified columns
type TableColumn ¶
TableColumn represents a column in the table
Click to show internal directories.
Click to hide internal directories.