paginator and styles
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"github.com/orus-dev/osui"
|
||||
)
|
||||
|
||||
type TextComponent struct {
|
||||
Data osui.ComponentData
|
||||
Text string
|
||||
}
|
||||
|
||||
func (t *TextComponent) GetComponentData() *osui.ComponentData {
|
||||
return &t.Data
|
||||
}
|
||||
|
||||
func (t TextComponent) Render() string {
|
||||
return t.Text
|
||||
}
|
||||
|
||||
func Text(text string) *TextComponent {
|
||||
return &TextComponent{Text: text}
|
||||
}
|
||||
Reference in New Issue
Block a user