From 8e0d77b4c72673d366999c17a857f634b3ca8cba Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Mon, 25 Nov 2024 17:15:22 +0200 Subject: Made colors package for coherent styling and migrated existing styles to it --- .../ui/core/networkcreation/networkcreation.go | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'internal/client/ui/core/networkcreation') diff --git a/internal/client/ui/core/networkcreation/networkcreation.go b/internal/client/ui/core/networkcreation/networkcreation.go index 08f85a3..b6324e0 100644 --- a/internal/client/ui/core/networkcreation/networkcreation.go +++ b/internal/client/ui/core/networkcreation/networkcreation.go @@ -4,25 +4,27 @@ import ( "github.com/charmbracelet/bubbles/textinput" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" + "github.com/kyren223/eko/internal/client/ui/colors" "github.com/kyren223/eko/internal/client/ui/field" ) var ( - style = lipgloss.NewStyle().Border(lipgloss.ThickBorder()) - focusColor = lipgloss.Color("#5874FF") - - focusedStyle = lipgloss.NewStyle().Foreground(focusColor) + style = lipgloss.NewStyle().Border(lipgloss.ThickBorder()) + focusedStyle = lipgloss.NewStyle().Foreground(colors.Focus) + headerStyle = lipgloss.NewStyle().Foreground(colors.Turquoise) fieldBlurredStyle = lipgloss.NewStyle(). PaddingLeft(1). Border(lipgloss.RoundedBorder()). - BorderForeground(lipgloss.Color("#007E8A")) - fieldFocusedStyle = fieldBlurredStyle.BorderForeground(focusedStyle.GetForeground()).Border(lipgloss.ThickBorder()) - - headerStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#54D7A9")) - - blurredUnderlineStyle = lipgloss.NewStyle().Border(lipgloss.ThickBorder(), false, false, true, false).BorderForeground(lipgloss.Color("240")) - focusedUnderlineStyle = blurredUnderlineStyle.BorderForeground(focusColor) + BorderForeground(colors.DarkCyan) + fieldFocusedStyle = fieldBlurredStyle. + BorderForeground(colors.Focus). + Border(lipgloss.ThickBorder()) + + blurredUnderlineStyle = lipgloss.NewStyle(). + Border(lipgloss.ThickBorder(), false, false, true, false). + BorderForeground(colors.Gray) + focusedUnderlineStyle = blurredUnderlineStyle.BorderForeground(colors.Focus) ) const ( -- cgit v1.3.1