add global style package
This commit is contained in:
28
internal/style/styles.go
Normal file
28
internal/style/styles.go
Normal 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
14
internal/style/themes.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user