Skip to content

Commit 4c851b5

Browse files
committed
update example
1 parent 45400ab commit 4c851b5

File tree

8 files changed

+4648
-4
lines changed

8 files changed

+4648
-4
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[ignore]
2+
; We fork some components by platform
3+
.*/*[.]android.js
4+
5+
; Ignore templates for 'react-native init'
6+
<PROJECT_ROOT>/node_modules/react-native/local-cli/templates/.*
7+
8+
; Ignore RN jest
9+
<PROJECT_ROOT>/node_modules/react-native/jest/.*
10+
11+
; Ignore RNTester
12+
<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
13+
14+
; Ignore the website subdir
15+
<PROJECT_ROOT>/node_modules/react-native/website/.*
16+
17+
; Ignore the Dangerfile
18+
<PROJECT_ROOT>/node_modules/react-native/danger/dangerfile.js
19+
20+
; Ignore Fbemitter
21+
<PROJECT_ROOT>/node_modules/fbemitter/.*
22+
23+
; Ignore "BUCK" generated dirs
24+
<PROJECT_ROOT>/node_modules/react-native/\.buckd/
25+
26+
; Ignore unexpected extra "@providesModule"
27+
.*/node_modules/.*/node_modules/fbjs/.*
28+
29+
; Ignore polyfills
30+
<PROJECT_ROOT>/node_modules/react-native/Libraries/polyfills/.*
31+
32+
; Ignore various node_modules
33+
<PROJECT_ROOT>/node_modules/react-native-gesture-handler/.*
34+
<PROJECT_ROOT>/node_modules/expo/.*
35+
<PROJECT_ROOT>/node_modules/react-navigation/.*
36+
<PROJECT_ROOT>/node_modules/xdl/.*
37+
<PROJECT_ROOT>/node_modules/reqwest/.*
38+
<PROJECT_ROOT>/node_modules/metro-bundler/.*
39+
40+
[include]
41+
42+
[libs]
43+
node_modules/react-native/Libraries/react-native/react-native-interface.js
44+
node_modules/react-native/flow/
45+
node_modules/expo/flow/
46+
47+
[options]
48+
emoji=true
49+
50+
module.system=haste
51+
52+
module.file_ext=.js
53+
module.file_ext=.jsx
54+
module.file_ext=.json
55+
module.file_ext=.ios.js
56+
57+
munge_underscores=true
58+
59+
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
60+
61+
suppress_type=$FlowIssue
62+
suppress_type=$FlowFixMe
63+
suppress_type=$FlowFixMeProps
64+
suppress_type=$FlowFixMeState
65+
suppress_type=$FixMe
66+
67+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)
68+
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(5[0-6]\\|[1-4][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native_oss[a-z,_]*\\)?)\\)?:? #[0-9]+
69+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
70+
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
71+
72+
unsafe.enable_getters_and_setters=true
73+
esproposal.decorators=ignore
74+
75+
[version]
76+
^0.56.0

example/navbar-buttons-demo/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88
"react-native-platform-touchable": "^1.1.1",
99
"react-navigation": "^1.0.0-beta.27",
1010
"react-navigation-header-buttons": "file:../.."
11+
},
12+
"devDependencies": {
13+
"flow-bin": "0.56"
1114
}
1215
}

example/navbar-buttons-demo/screens/UsageCustom.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
//@flow
12
import React from 'react';
23
import { Ionicons } from '@expo/vector-icons';
34
import { StyleSheet, Text, View, Button } from 'react-native';
45
import { withNavigation } from 'react-navigation';
56
import HeaderButtons from 'react-navigation-header-buttons';
7+
import type ScreenProps from './index';
68

79
@withNavigation
8-
export class UsageCustom extends React.Component {
10+
export class UsageCustom extends React.Component<ScreenProps> {
911
static navigationOptions = {
1012
title: 'Custom Usage',
1113
headerRight: (

example/navbar-buttons-demo/screens/UsageLeft.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
//@flow
12
import React from 'react';
23
import { MaterialIcons, Ionicons } from '@expo/vector-icons';
34
import { StyleSheet, Text, View, Button } from 'react-native';
45
import HeaderButtons from 'react-navigation-header-buttons';
56
import { withNavigation } from 'react-navigation';
7+
import type ScreenProps from './index';
68

79
@withNavigation
8-
export class UsageLeft extends React.Component {
10+
export class UsageLeft extends React.Component<ScreenProps> {
911
static navigationOptions = ({ navigation, navigation: { state } }) => ({
1012
title: 'Usage Left',
1113
headerLeft: (

example/navbar-buttons-demo/screens/UsageWithIcons.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
//@flow
12
import React from 'react';
23
import { Ionicons } from '@expo/vector-icons';
34
import { StyleSheet, Text, View, Button } from 'react-native';
45
import HeaderButtons from 'react-navigation-header-buttons';
56
import { withNavigation } from 'react-navigation';
67
import Icon from 'react-native-vector-icons/MaterialIcons';
8+
import type ScreenProps from './index';
79

810
@withNavigation
9-
export class UsageWithIcons extends React.Component {
11+
export class UsageWithIcons extends React.Component<ScreenProps> {
1012
static navigationOptions = {
1113
title: 'Usage With Icons',
1214
headerRight: (

example/navbar-buttons-demo/screens/UsageWithOverflow.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
//@flow
12
import React from 'react';
23
import { MaterialIcons } from '@expo/vector-icons';
34
import { StyleSheet, Text, View, Button } from 'react-native';
45
import HeaderButtons from 'react-navigation-header-buttons';
56
import { withNavigation } from 'react-navigation';
7+
import type ScreenProps from './index';
68

79
@withNavigation
8-
export class UsageWithOverflow extends React.Component {
10+
export class UsageWithOverflow extends React.Component<ScreenProps> {
911
static navigationOptions = {
1012
title: 'Usage With Overflow',
1113
headerRight: (

example/navbar-buttons-demo/screens/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ export { UsageCustom } from './UsageCustom';
22
export { UsageWithIcons } from './UsageWithIcons';
33
export { UsageWithOverflow } from './UsageWithOverflow';
44
export { UsageLeft } from './UsageLeft';
5+
6+
export type ScreenProps = {
7+
navigation: any,
8+
};

0 commit comments

Comments
 (0)