Quellcode durchsuchen

Tabs -> BottomTabs

Daniel Zlotin vor 7 Jahren
Ursprung
Commit
b2a775a1f8

+ 1
- 1
ios/RNNLayoutNode.m Datei anzeigen

@@ -23,7 +23,7 @@
23 23
 }
24 24
 -(BOOL)isTabs
25 25
 {
26
-	return [self.type isEqualToString:@"Tabs"];
26
+	return [self.type isEqualToString:@"BottomTabs"];
27 27
 }
28 28
 -(BOOL)isSideMenuRoot
29 29
 {

+ 5
- 5
src/commands/LayoutTreeCrawler.test.js Datei anzeigen

@@ -13,21 +13,21 @@ describe('LayoutTreeCrawler', () => {
13 13
   });
14 14
 
15 15
   it('crawls a layout tree and adds unique id to each node', () => {
16
-    const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.Tabs }] };
16
+    const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.BottomTabs }] };
17 17
     uut.crawl(node);
18 18
     expect(node.id).toEqual('Container+UNIQUE_ID');
19
-    expect(node.children[0].id).toEqual('Tabs+UNIQUE_ID');
19
+    expect(node.children[0].id).toEqual('BottomTabs+UNIQUE_ID');
20 20
   });
21 21
 
22 22
   it('crawls a layout tree and ensures data exists', () => {
23
-    const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.Tabs }] };
23
+    const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.BottomTabs }] };
24 24
     uut.crawl(node);
25 25
     expect(node.data).toEqual({});
26 26
     expect(node.children[0].data).toEqual({});
27 27
   });
28 28
 
29 29
   it('crawls a layout tree and ensures children exists', () => {
30
-    const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.Tabs }] };
30
+    const node = { type: LayoutTypes.Container, children: [{ type: LayoutTypes.BottomTabs }] };
31 31
     uut.crawl(node);
32 32
     expect(node.children[0].children).toEqual([]);
33 33
   });
@@ -38,7 +38,7 @@ describe('LayoutTreeCrawler', () => {
38 38
   });
39 39
 
40 40
   it('saves passProps into store for Container nodes', () => {
41
-    const node = { type: LayoutTypes.Tabs, children: [{ type: LayoutTypes.Container, data: { passProps: { myProp: 123 } } }] };
41
+    const node = { type: LayoutTypes.BottomTabs, children: [{ type: LayoutTypes.Container, data: { passProps: { myProp: 123 } } }] };
42 42
     expect(store.getPropsForContainerId('Container+UNIQUE_ID')).toEqual({});
43 43
     uut.crawl(node);
44 44
     expect(store.getPropsForContainerId('Container+UNIQUE_ID')).toEqual({ myProp: 123 });

+ 1
- 1
src/commands/LayoutTreeParser.js Datei anzeigen

@@ -25,7 +25,7 @@ export default class LayoutTreeParser {
25 25
 
26 26
   _createTabs(tabs) {
27 27
     return {
28
-      type: LayoutTypes.Tabs,
28
+      type: LayoutTypes.BottomTabs,
29 29
       children: _.map(tabs, (t) => this._createContainerStackWithContainerData(t.container))
30 30
     };
31 31
   }

+ 2
- 2
src/commands/LayoutTreeParser.test.js Datei anzeigen

@@ -51,7 +51,7 @@ describe('LayoutTreeParser', () => {
51 51
     it('parses tab based', () => {
52 52
       expect(uut.parseFromSimpleJSON(SimpleLayouts.tabBasedApp))
53 53
         .toEqual({
54
-          type: 'Tabs',
54
+          type: 'BottomTabs',
55 55
           children: [
56 56
             {
57 57
               type: 'ContainerStack',
@@ -240,7 +240,7 @@ describe('LayoutTreeParser', () => {
240 240
               type: 'SideMenuCenter',
241 241
               children: [
242 242
                 {
243
-                  type: 'Tabs',
243
+                  type: 'BottomTabs',
244 244
                   children: [
245 245
                     {
246 246
                       type: 'ContainerStack',

+ 1
- 1
src/commands/LayoutTypes.js Datei anzeigen

@@ -1,7 +1,7 @@
1 1
 export default {
2 2
   Container: 'Container',
3 3
   ContainerStack: 'ContainerStack',
4
-  Tabs: 'Tabs',
4
+  BottomTabs: 'BottomTabs',
5 5
   SideMenuRoot: 'SideMenuRoot',
6 6
   SideMenuCenter: 'SideMenuCenter',
7 7
   SideMenuLeft: 'SideMenuLeft',