Refactor: CheckboxGroup and RadioGroup return ChoiceResult

They returned InputResult with an Input nobody read (nil for RadioGroup).
This commit is contained in:
ZacharyZhang-NY committed 2026-10-05 13:36:29 -04:00
1 parent 8880865021
commit dd1e9597af
4 files changed
+6 -7

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ mujica.CheckboxGroup(c, "Notifications", []mujica.CheckboxItem{
```go
func Checkbox(c *ui.Context, value *bool, label string, opts CheckboxOptions) *ui.Element
func CheckboxGroup(c *ui.Context, label string, items []CheckboxItem, opts CheckboxGroupOptions) InputResult
func CheckboxGroup(c *ui.Context, label string, items []CheckboxItem, opts CheckboxGroupOptions) ChoiceResult
```
## 参数
+1 -1
View File
@@ -13,7 +13,7 @@ if mujica.RadioGroup(c, &size, items, mujica.RadioGroupOptions{Label: "Size"}).C
}
```
签名:`func RadioGroup[T comparable](c *ui.Context, value *T, items []RadioItem[T], opts RadioGroupOptions) InputResult`
签名:`func RadioGroup[T comparable](c *ui.Context, value *T, items []RadioItem[T], opts RadioGroupOptions) ChoiceResult`
## 参数