File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 5
5
6
6
tea "github.com/charmbracelet/bubbletea"
7
7
"github.com/initia-labs/weave/models/weaveinit"
8
+ "github.com/initia-labs/weave/styles"
8
9
"github.com/initia-labs/weave/utils"
9
10
)
10
11
@@ -83,5 +84,6 @@ func (m *Homepage) View() string {
83
84
view += "\n Press Enter to select, or q to quit."
84
85
}
85
86
87
+ view += styles .Text ("\n ?" , styles .Cyan ) + " Please specify the endpoint to fetch genesis.json " + styles .Text ("> add in http format" , styles .Gray )
86
88
return view
87
89
}
Original file line number Diff line number Diff line change
1
+ package styles
2
+
3
+ import (
4
+ "github.com/charmbracelet/lipgloss"
5
+ )
6
+
7
+ type HexColor string
8
+
9
+ const (
10
+ White HexColor = "#FFFFFF"
11
+ Cyan HexColor = "#27D8FF"
12
+ Green HexColor = "#B0EE5F"
13
+ Gray HexColor = "#808080"
14
+ Red HexColor = "#FF5656"
15
+ )
16
+
17
+ // Text applies a hex color to a given string and returns the styled string
18
+ func Text (text string , color HexColor ) string {
19
+ style := lipgloss .NewStyle ().Foreground (lipgloss .Color (string (color )))
20
+ return style .Render (text )
21
+ }
22
+
23
+ // BoldText applies bold and color styling to a string
24
+ func BoldText (text string , color HexColor ) string {
25
+ style := lipgloss .NewStyle ().Bold (true ).Foreground (lipgloss .Color (string (color )))
26
+ return style .Render (text )
27
+ }
You can’t perform that action at this time.
0 commit comments