Split into category packages; module github.com/ZacharyZhang-NY/MujicaUI

This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 16:18:48 -04:00
1 parent 5a7e921c7e
commit 22b53e9e9e
1822 files changed
+24568 -21314

No files matched your search

+5 -5
View File
@@ -9,12 +9,12 @@
```go
text := "se"
open := true
items := []mujica.Completion{{Label: "Seal", Kind: mujica.SymbolMethod, Detail: "func()"}, {Label: "Search", Kind: mujica.SymbolFunction}}
var state mujica.CompletionMenuState
items := []code.Completion{{Label: "Seal", Kind: code.SymbolMethod, Detail: "func()"}, {Label: "Search", Kind: code.SymbolFunction}}
var state code.CompletionMenuState
view := func(c *ui.Context) {
mujica.Use(c, mujica.Settings{})
in := mujica.TextInput(c, &text, mujica.TextInputOptions{Label: "Code"})
if r := mujica.CompletionMenu(c, in.Input, &open, items, &state, mujica.CompletionMenuOptions{}); r.Accepted != nil {
core.Use(c, core.Settings{})
in := input.TextInput(c, &text, input.TextInputOptions{Label: "Code"})
if r := code.CompletionMenu(c, in.Input, &open, items, &state, code.CompletionMenuOptions{}); r.Accepted != nil {
text = r.Accepted.Label
}
}