Refactor: CheckboxGroup and RadioGroup return ChoiceResult
They returned InputResult with an Input nobody read (nil for RadioGroup).
This commit is contained in:
4 files changed
+6
-7
No files matched your search
@@ -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
|
||||
```
|
||||
|
||||
## 参数
|
||||
|
||||
@@ -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`
|
||||
|
||||
## 参数
|
||||
|
||||
|
||||
Reference in new issue
Block a user