소스 검색

Fix docs syntax on declaring buttons statically (#3425)

André Staltz 6 년 전
부모
커밋
b2427eb463
1개의 변경된 파일10개의 추가작업 그리고 7개의 파일을 삭제
  1. 10
    7
      docs/docs/topBar-buttons.md

+ 10
- 7
docs/docs/topBar-buttons.md 파일 보기

@@ -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
 }