textbox color support added

This commit is contained in:
sqshq 2019-06-21 00:32:15 -04:00
parent fd86661ed2
commit f0d76a0d91
1 changed files with 6 additions and 1 deletions

View File

@ -20,10 +20,15 @@ type TextBox struct {
func NewTextBox(c config.TextBoxConfig, palette console.Palette) *TextBox {
color := c.Color
if color == nil {
color = &palette.BaseColor
}
box := TextBox{
Block: component.NewBlock(c.Title, *c.Border, palette),
Consumer: data.NewConsumer(),
style: ui.NewStyle(palette.BaseColor),
style: ui.NewStyle(*color),
}
go func() {