Browse Source

Fix docs syntax on declaring buttons statically (#3425)

André Staltz 6 years ago
parent
commit
b2427eb463
1 changed files with 10 additions and 7 deletions
  1. 10
    7
      docs/docs/topBar-buttons.md

+ 10
- 7
docs/docs/topBar-buttons.md View File

@@ -25,14 +25,17 @@ Buttons can be defined in a screen's static options:
25 25
 ```js
26 26
 class MyScreen extends Component {
27 27
   static get options() {
28
-    topBar: {
29
-    leftButtons: [
30
-      {
31
-        id: 'buttonOne',
32
-        icon: require('icon.png')
28
+    return {
29
+      topBar: {
30
+        leftButtons: [
31
+          {
32
+            id: 'buttonOne',
33
+            icon: require('icon.png')
34
+          }
35
+        ],
36
+        rightButtons: [],
33 37
       }
34
-    ],
35
-    rightButtons: [],
38
+    };
36 39
   }
37 40
   
38 41
 }