@@ -30,34 +30,24 @@ const (
30
30
31
31
accentColor = termenv .ANSI256Color (32 )
32
32
33
- DefaultHeader = "Use the arrow keys to navigate: ↓ ↑ → ←"
33
+ defaultHeader = "Use the arrow keys to navigate: ↓ ↑ → ←"
34
+ //DefaultCursor = "»"
34
35
)
35
36
36
37
// DefaultSelectedChoiceStyle is the default style for selected choices.
37
38
func DefaultSelectedChoiceStyle (c * Choice ) string {
38
- return termenv .String (c .String ).Foreground (accentColor ).Bold ().String ()
39
+ //return termenv.String(c.String).Foreground(accentColor).Bold().String()
40
+ //return common.RenderedText(c.String, "red")
41
+ return c .String
39
42
}
40
43
41
44
// DefaultFinalChoiceStyle is the default style for final choices.
42
45
func DefaultFinalChoiceStyle (c * Choice ) string {
43
46
return termenv .String (c .String ).Foreground (accentColor ).String ()
44
47
}
45
48
46
- // DefaultHeaderFuncWithAppend return the default HeaderFunc and append
47
- // the given string to the next line of the default header
48
- func DefaultHeaderFuncWithAppend (append string ) func (m Model , obj interface {}, gdIndex int ) string {
49
- return func (m Model , obj interface {}, gdIndex int ) string {
50
- //return common.FontColor(DefaultHeader+"\n"+append, ColorHeader)
51
- return DefaultHeader + "\n " + append
52
- }
53
- }
54
-
55
49
// Selection represents a configurable selection prompt.
56
50
type Selection struct {
57
- HeadPrompt string
58
-
59
- // HeaderFunc Header rendering function
60
- HeaderFunc func (m Model , obj interface {}, gdIndex int ) string
61
51
62
52
// Choices represent all selectable choices of the selection. Slices of
63
53
// arbitrary types can be converted to a slice of choices using the helper
@@ -194,7 +184,6 @@ func New(prompt string, choices []*Choice) *Selection {
194
184
195
185
return & Selection {
196
186
Choices : choices ,
197
- HeadPrompt : DefaultHeader ,
198
187
Prompt : prompt ,
199
188
FilterPrompt : DefaultFilterPrompt ,
200
189
Template : DefaultTemplate ,
0 commit comments