Browse Source

Fix child layout documentation (#6110)

Alexander Kurnikowski 4 years ago
parent
commit
4eb1ae6b36
No account linked to committer's email address

+ 11
- 9
website/api/layout-BottomTabs.mdx View File

16
         name: 'HomeScreen'
16
         name: 'HomeScreen'
17
       }
17
       }
18
     },
18
     },
19
-    stack: {
20
-      id: 'PROFILE_TAB',
21
-      children: [
22
-        {
23
-          component: {
24
-            id: 'PROFILE_SCREEN',
25
-            name: 'ProfileScreen'
19
+    {
20
+      stack: {
21
+        id: 'PROFILE_TAB',
22
+        children: [
23
+          {
24
+            component: {
25
+              id: 'PROFILE_SCREEN',
26
+              name: 'ProfileScreen'
27
+            }
26
           }
28
           }
27
-        }
28
-      ]
29
+        ]
30
+      }
29
     }
31
     }
30
   ]
32
   ]
31
 }
33
 }

+ 14
- 12
website/docs/docs-bottomTabs.mdx View File

39
         }
39
         }
40
       }
40
       }
41
     },
41
     },
42
-    stack: {
43
-      id: 'PROFILE_TAB',
44
-      children: [
45
-        {
46
-          component: {
47
-            id: 'PROFILE_SCREEN',
48
-            name: 'ProfileScreen'
42
+    {
43
+      stack: {
44
+        id: 'PROFILE_TAB',
45
+        children: [
46
+          {
47
+            component: {
48
+              id: 'PROFILE_SCREEN',
49
+              name: 'ProfileScreen'
50
+            }
51
+          }
52
+        ],
53
+        options: {
54
+          bottomTab: {
55
+            icon: require('./profile.png')
49
           }
56
           }
50
-        }
51
-      ],
52
-      options: {
53
-        bottomTab: {
54
-          icon: require('./profile.png')
55
         }
57
         }
56
       }
58
       }
57
     }
59
     }

+ 32
- 22
website/docs/docs-root.mdx View File

84
   root: {
84
   root: {
85
     bottomTabs: {
85
     bottomTabs: {
86
       children: [
86
       children: [
87
-        stack: {
88
-          children: [
89
-            {
90
-              component: {
91
-                name: 'FEED_SCREEN'
87
+        {
88
+          stack: {
89
+            children: [
90
+              {
91
+                component: {
92
+                  name: 'FEED_SCREEN'
93
+                }
92
               }
94
               }
93
-            }
94
-          ]
95
+            ]
96
+          }
95
         },
97
         },
96
-        stack: {
97
-          children: [
98
-            {
99
-              component: {
100
-                name: 'CHAT_LIST'
98
+        {
99
+          stack: {
100
+            children: [
101
+              {
102
+                component: {
103
+                  name: 'CHAT_LIST'
104
+                }
101
               }
105
               }
102
-            }
103
-          ]
106
+            ]
107
+          }
104
         },
108
         },
105
-        stack: {
106
-          children: [
107
-            {
108
-              component: {
109
-                name: 'PROFILE_SCREEN'
109
+        {
110
+          stack: {
111
+            children: [
112
+              {
113
+                component: {
114
+                  name: 'PROFILE_SCREEN'
115
+                }
110
               }
116
               }
111
-            }
112
-          ]
117
+            ]
118
+          }
113
         }
119
         }
114
       ]
120
       ]
115
     }
121
     }
129
       center: {
135
       center: {
130
         stack: {
136
         stack: {
131
           children: [
137
           children: [
132
-            name: 'HOME_SCREEN'
138
+            {
139
+              component: {
140
+                name: 'HOME_SCREEN'
141
+              }
142
+            }
133
           ]
143
           ]
134
         }
144
         }
135
       },
145
       },

+ 1
- 1
website/docs/style-theme.mdx View File

24
 // That stack's topBar background color will be red, as is set in default options
24
 // That stack's topBar background color will be red, as is set in default options
25
 Navigation.setRoot({
25
 Navigation.setRoot({
26
   root: {
26
   root: {
27
-    stack :{
27
+    stack: {
28
       children: [
28
       children: [
29
         ...
29
         ...
30
       ]
30
       ]