bug fix but still a new one :(
This commit is contained in:
+4
-1
@@ -2,6 +2,7 @@ package ui
|
||||
|
||||
import (
|
||||
"github.com/orus-dev/osui"
|
||||
"github.com/orus-dev/osui/colors"
|
||||
)
|
||||
|
||||
type TextComponent struct {
|
||||
@@ -18,9 +19,11 @@ func (t *TextComponent) GetComponentData() *osui.ComponentData {
|
||||
}
|
||||
|
||||
func (t TextComponent) Render() string {
|
||||
return t.Text
|
||||
return colors.Reset + t.Data.DefaultColor + t.Text
|
||||
}
|
||||
|
||||
func (t *TextComponent) SetStyle(interface{}) {}
|
||||
|
||||
func Text(text string) *TextComponent {
|
||||
return &TextComponent{Text: text}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user