bug fix but still a new one :(

This commit is contained in:
2024-09-26 23:03:17 +02:00
parent 3b3e92fae5
commit 4214f96c61
8 changed files with 108 additions and 66 deletions
+4 -1
View File
@@ -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}
}