From 9fc0d0ea825838374568cf6d9a299211849de9fe Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 19 May 2020 14:58:08 -0400 Subject: [PATCH] Support background colors in textinput --- textinput/textinput.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/textinput/textinput.go b/textinput/textinput.go index 5776566..334f7d1 100644 --- a/textinput/textinput.go +++ b/textinput/textinput.go @@ -26,6 +26,7 @@ type Model struct { BlinkSpeed time.Duration Placeholder string TextColor string + BackgroundColor string PlaceholderColor string CursorColor string @@ -64,6 +65,7 @@ func (m *Model) colorText(s string) string { return termenv. String(s). Foreground(color(m.TextColor)). + Background(color(m.BackgroundColor)). String() } @@ -73,6 +75,7 @@ func (m *Model) colorPlaceholder(s string) string { return termenv. String(s). Foreground(color(m.PlaceholderColor)). + Background(color(m.BackgroundColor)). String() }