Skip to content

Commit f5e18f2

Browse files
authored
Merge pull request #15 from Ryoschin/main
Update Stack
2 parents 4b8cf70 + 6a7c340 commit f5e18f2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/content/docs/config/widgets.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -367,16 +367,16 @@ subclass of [Gtk.Stack](https://gjs-docs.gnome.org/gtk30~3.0/gtk.stack)
367367

368368
| Property | Type | Description |
369369
|----------|------|-------------|
370-
| items | \[string, Widget\] | name - Widget pairs |
371-
| shown | string | Name of the widget to show. This can't be set on construction, instead the first give widget will be shown. |
370+
| children | \{string, Widget\} | name: Widget key-value pairs |
371+
| shown | string | Name of the widget to show. This can't be set on construction, instead the first given widget will be shown. |
372372
| transition | string | `transitionType` represented as a string. Valid values are `none`, `crossfade`, `slide_right`, `slide_left`, `slide_up`, `slide_down`, `slide_left_right`, `slide_up_down`, `over_up`, `over_down`, `over_left`, `over_right`, `under_up`, `under_down`, `under_left`, `under_right`, `over_up_down`, `over_down_up`, `over_left_right`, `over_right_left`
373373

374374
```js
375375
const stack = Widget.Stack({
376-
items: [
377-
['child1', Widget.Label('first child')],
378-
['child2', Widget.Label('second child')],
379-
],
376+
children: {
377+
'child1': Widget.Label('first child'),
378+
'child2': Widget.Label('second child'),
379+
},
380380
setup: self => self.hook(gobject, () => {
381381
self.shown = 'child2';
382382
})

0 commit comments

Comments
 (0)