add global style package

This commit is contained in:
Robin Olsen
2026-02-13 10:14:05 +01:00
parent e994c890f4
commit b1a72a5a2e
2 changed files with 42 additions and 0 deletions

28
internal/style/styles.go Normal file
View File

@@ -0,0 +1,28 @@
package style
import "github.com/charmbracelet/lipgloss"
// Color palette
var (
PrimaryColor = lipgloss.AdaptiveColor{Light: "#007acc", Dark: "#1e90ff"}
SecondaryColor = lipgloss.AdaptiveColor{Light: "#ff6f61", Dark: "#ff6347"}
AccentColor = lipgloss.AdaptiveColor{Light: "#6a5acd", Dark: "#9370db"}
Background = lipgloss.AdaptiveColor{Light: "#ffffff", Dark: "#1e1e1e"}
TextColor = lipgloss.AdaptiveColor{Light: "#000000", Dark: "#ffffff"}
)
var (
AppStyle = lipgloss.NewStyle().Padding(1, 2).Background(Background).Foreground(TextColor)
)
var (
DefaultBorder = lipgloss.NormalBorder()
BorderStyle = lipgloss.NewStyle().Border(DefaultBorder).BorderForeground(PrimaryColor)
)
var (
TitleStyle = lipgloss.NewStyle().Foreground(PrimaryColor).Bold(true)
DescriptionStyle = lipgloss.NewStyle().Foreground(TextColor).Italic(true)
DetailStyle = lipgloss.NewStyle().Foreground(SecondaryColor)
HelpStyle = lipgloss.NewStyle().Foreground(AccentColor)
)

14
internal/style/themes.go Normal file
View File

@@ -0,0 +1,14 @@
package style
import (
"github.com/charmbracelet/huh"
"github.com/charmbracelet/lipgloss"
)
func HuhCenterTheme() *huh.Theme {
theme := huh.ThemeBase16()
theme.Focused.Base = lipgloss.NewStyle().Align(lipgloss.Center)
return theme
}