You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/docs/docs-stack.mdx
+4-12
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ The stack manages the TopBar at the top of the stack. The TopBar displays the cu
26
26
}>
27
27
<TabItemvalue="single">
28
28
29
+
29
30
A stack declared with a single child.
30
31
31
32
```js
@@ -43,6 +44,7 @@ const stack = {
43
44
</TabItem>
44
45
<TabItemvalue="multiple">
45
46
47
+
46
48
A stack can be initialized with more than one child, in which case the last child will be the currently displayed child and the first child will be hidden. In this case the back button will be visible automatically, clicking it will go back in the stack revealing the first (previous) child.
47
49
Once the root child becomes visible, the back button is hidden.
48
50
@@ -66,6 +68,7 @@ const stack = {
66
68
</TabItem>
67
69
</Tabs>
68
70
71
+
69
72
## TopBar Buttons
70
73
71
74
Buttons can be added to the [right](#rightButtons) and [left](#leftButtons) areas of the TopBar. Buttons can have either an icon or a text. They are declared in the the options object and, as with any other option, can be updated dynamically with the `Navigation.mergeOptions` command.
@@ -82,20 +85,9 @@ To do so on iOS, include a button with a menu icon and open an [ActionSheet](htt
82
85
83
86
On Android, use the [showAsAction](../api/options-button#showasaction) options to control when the button should appear in the menu.
84
87
85
-
### Left button
86
-
87
-
Left buttons behave like right buttons with two caveats on Android:
88
-
89
-
- Only a single left button is allowed
90
-
- Textual left button isn't supported
91
-
92
88
### Using a react component in a button
93
89
94
-
:::caution
95
-
At the moment, custom buttons in `leftButtons` are supported only on iOS.
96
-
:::
97
-
98
-
Sometimes we require more from our buttons. In order to support every product need React Components can be used as custom views of buttons.
90
+
Sometimes we require more from our buttons. In order to support every product need, React Components can be used as custom views of buttons.
99
91
To do so, you'll first need to register the view with Navigation, just like you register your components used as screens:
0 commit comments