Docs: snippets match compiled Examples
This commit is contained in:
4 files changed
+4
-4
No files matched your search
@@ -8,7 +8,7 @@
|
||||
|
||||
```go
|
||||
if mujica.Pagination(c, &page, &size, mujica.PaginationOptions{Total: 420, PageSizes: []int{10, 20, 50}, Jump: true}).Changed() {
|
||||
load(page, size)
|
||||
fmt.Println("load page", page, "of size", size)
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ mujica.Toolbar(c, mujica.ToolbarOptions{Label: "Format"}, func() {
|
||||
})
|
||||
mujica.ToolbarSeparator(c)
|
||||
if mujica.ToolbarButton(c, "Copy", mujica.ToolbarButtonOptions{Icon: icons.Must("copy"), ShowLabel: true}).Clicked() {
|
||||
copySelection()
|
||||
fmt.Println("copy")
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
@@ -12,7 +12,7 @@ res := mujica.CommandPalette(c, &open, []mujica.Command{
|
||||
{ID: "theme", Label: "Toggle dark mode", Group: "View", Keywords: []string{"night"}},
|
||||
}, mujica.CommandPaletteOptions{})
|
||||
if id, ok := res.Chosen(); ok {
|
||||
run(id)
|
||||
fmt.Println("run", id)
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
## 最小示例
|
||||
|
||||
```go
|
||||
ui.Row(c).Gap(12).Children(func() {
|
||||
ui.Row(c).Padding(16).Gap(12).Children(func() {
|
||||
mujica.Skeleton(c, mujica.SkeletonOptions{Shape: mujica.SkeletonCircle})
|
||||
ui.Column(c).Grow(1).Children(func() {
|
||||
mujica.Skeleton(c, mujica.SkeletonOptions{Lines: 2})
|
||||
|
||||
Reference in new issue
Block a user