paginator and styles

This commit is contained in:
2024-09-24 20:42:44 +02:00
parent 3529f3dcc5
commit 905a77f8b0
8 changed files with 263 additions and 45 deletions
+19
View File
@@ -0,0 +1,19 @@
package main
import (
"github.com/orus-dev/osui"
"github.com/orus-dev/osui/styles"
"github.com/orus-dev/osui/ui"
)
func main() {
colors := ui.Text(
styles.Red + "Red!\n" + styles.Green + "Green!\n" + styles.Blue + "Blue!\n",
)
input := ui.InputBox(30)
paginator := ui.Paginator(colors, input)
paginator.UpdatePages[1] = input.Update
screen := osui.NewScreen(paginator)
screen.Render()
paginator.Run()
}