Bläddra i källkod

Update styling.md

Yogev B 6 år sedan
förälder
incheckning
0c2b10ed95
No account linked to committer's email address
1 ändrade filer med 13 tillägg och 5 borttagningar
  1. 13
    5
      docs/docs/styling.md

+ 13
- 5
docs/docs/styling.md Visa fil

@@ -70,7 +70,9 @@ Navigation.setOptions(this.props.componentId, {
70 70
     leftButtons: [{
71 71
       id: 'buttonOne',
72 72
       icon: require('icon.png'),
73
-      component: 'example.CustomButtonComponent',
73
+      component: {
74
+        name: 'example.CustomButtonComponent'
75
+      },
74 76
       title: 'Button one',
75 77
       enabled: true,
76 78
       disableIconTint: false,
@@ -93,14 +95,18 @@ Navigation.setOptions(this.props.componentId, {
93 95
     backButtonHidden: false,
94 96
     backButtonTitle: 'Back',
95 97
     hideBackButtonTitle: false,
96
-    componentName: 'example.CustomTopBar',
98
+    component: {
99
+      name: 'example.CustomTopBar'
100
+    },
97 101
     title: {
98 102
       text: 'Title',
99 103
       fontSize: 14,
100 104
       color: 'red',
101 105
       fontFamily: 'Helvetica',
102
-      component: 'example.CustomTopBarTitle',
103
-      componentAlignment: 'center',
106
+      component: {
107
+        name: 'example.CustomTopBarTitle',
108
+        alignment: 'center'
109
+      }
104 110
     },
105 111
     subtitle: {
106 112
       text: 'Title',
@@ -111,7 +117,9 @@ Navigation.setOptions(this.props.componentId, {
111 117
     },
112 118
     background: {
113 119
       color: '#00ff00',
114
-      component: 'example.CustomTopBarBackground'
120
+      component: {
121
+        name: 'example.CustomTopBarBackground'
122
+      }
115 123
     }
116 124
   },
117 125
   bottomTabs: {