Skip to content

Commit 47fb4ee

Browse files
author
ron
committed
suport isLTR and remove peer dependencies
1 parent aadf249 commit 47fb4ee

File tree

14 files changed

+116
-87
lines changed

14 files changed

+116
-87
lines changed

Example/.expo-shared/assets.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"f9155ac790fd02fadcdeca367b02581c04a353aa6d5aa84409a59f6804c87acd": true,
3-
"89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true
4-
}
2+
"12bb71342c6255bbf50437ec8f4441c083f47cdb74bd89160c15e4f43e52a1cb": true,
3+
"40b842e832070c58deac6aa9e08fa459302ee3f9da492c7e77d93d2fbf4a56fd": true
4+
}

Example/.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ npm-debug.*
88
*.mobileprovision
99
*.orig.*
1010
web-build/
11-
web-report/
1211

1312
# macOS
1413
.DS_Store

Example/App.tsx

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ const MSG = [
88
"Best wishes on your birthday – may you have many, many more",
99
"Wishing you the happiest of birthdays",
1010
"Best wishes for a fantastic person on your birthday",
11-
"I hope you treat yourself to something special on your birthday – you deserve it!"
11+
"I hope you treat yourself to something special on your birthday – you deserve it!",
1212
];
1313

14-
function getRandomInt(max) {
14+
function getRandomInt(max: number) {
1515
return Math.floor(Math.random() * Math.floor(max));
1616
}
1717

1818
export default class App extends React.Component {
1919
state = {
20-
welcomeMsg: MSG[0]
20+
welcomeMsg: MSG[0],
2121
};
2222

2323
updateText = () => {
2424
this.setState({
25-
welcomeMsg: MSG[getRandomInt(5)]
25+
welcomeMsg: MSG[getRandomInt(5)],
2626
});
2727
};
2828

@@ -39,6 +39,9 @@ export default class App extends React.Component {
3939
<AutoScrolling style={styles.scrolling2}>
4040
<Text style={styles.welcome}>{welcomeMsg}</Text>
4141
</AutoScrolling>
42+
<AutoScrolling isLTR style={styles.scrolling2}>
43+
<Text style={styles.welcome}>{welcomeMsg}</Text>
44+
</AutoScrolling>
4245
<TouchableOpacity onPress={this.updateText} style={styles.button}>
4346
<Text style={styles.buttonText}>Change Birthday Wish</Text>
4447
</TouchableOpacity>
@@ -51,35 +54,36 @@ const styles = StyleSheet.create({
5154
container: {
5255
flex: 1,
5356
paddingTop: 200,
54-
backgroundColor: "white"
57+
backgroundColor: "white",
5558
},
5659
image: {
5760
width: 200,
58-
height: 200
61+
height: 200,
5962
},
6063
scrolling1: {
61-
marginVertical: 10
64+
marginVertical: 10,
6265
},
6366
scrolling2: {
6467
backgroundColor: "red",
6568
alignItems: "center",
6669
padding: 20,
67-
marginHorizontal: 20
70+
marginHorizontal: 20,
71+
marginBottom: 20,
6872
},
6973
welcome: {
7074
color: "white",
7175
fontSize: 20,
72-
fontWeight: "bold"
76+
fontWeight: "bold",
7377
},
7478
button: {
7579
margin: 20,
7680
backgroundColor: "blue",
7781
justifyContent: "center",
7882
paddingVertical: 10,
79-
borderRadius: 10
83+
borderRadius: 10,
8084
},
8185
buttonText: {
8286
color: "white",
83-
textAlign: "center"
84-
}
87+
textAlign: "center",
88+
},
8589
});

Example/app.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
{
22
"expo": {
3-
"name": "Blank Template (TypeScript)",
3+
"name": "Example",
44
"slug": "Example",
5-
"privacy": "public",
6-
"sdkVersion": "36.0.0",
7-
"platforms": [
8-
"ios",
9-
"android",
10-
"web"
11-
],
125
"version": "1.0.0",
136
"orientation": "portrait",
147
"icon": "./assets/icon.png",
@@ -25,6 +18,15 @@
2518
],
2619
"ios": {
2720
"supportsTablet": true
21+
},
22+
"android": {
23+
"adaptiveIcon": {
24+
"foregroundImage": "./assets/adaptive-icon.png",
25+
"backgroundColor": "#FFFFFF"
26+
}
27+
},
28+
"web": {
29+
"favicon": "./assets/favicon.png"
2830
}
2931
}
3032
}

Example/assets/adaptive-icon.png

17.1 KB
Loading

Example/assets/favicon.png

1.43 KB
Loading

Example/assets/icon.png

20.8 KB
Loading

Example/assets/splash.png

40.3 KB
Loading

Example/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@
88
"eject": "expo eject"
99
},
1010
"dependencies": {
11-
"expo": "~36.0.0",
12-
"react": "~16.9.0",
13-
"react-dom": "~16.9.0",
14-
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz",
15-
"react-native-auto-scrolling": "^2.0.0",
16-
"react-native-screens": "2.0.0-alpha.12",
17-
"react-native-web": "~0.11.7"
11+
"expo": "~40.0.0",
12+
"expo-status-bar": "~1.0.3",
13+
"react": "16.13.1",
14+
"react-dom": "16.13.1",
15+
"react-native": "https://github.com/expo/react-native/archive/sdk-40.0.1.tar.gz",
16+
"react-native-auto-scrolling": "^2.0.2",
17+
"react-native-web": "~0.13.12"
1818
},
1919
"devDependencies": {
20-
"@types/react": "~16.9.0",
21-
"@types/react-native": "~0.60.23",
22-
"@babel/core": "^7.0.0",
23-
"babel-preset-expo": "~8.0.0",
24-
"typescript": "~3.6.3"
20+
"@babel/core": "~7.9.0",
21+
"@types/react": "~16.9.35",
22+
"@types/react-dom": "~16.9.8",
23+
"@types/react-native": "~0.63.2",
24+
"typescript": "~4.0.0"
2525
},
2626
"private": true
2727
}

Example/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"moduleResolution": "node",
77
"noEmit": true,
88
"skipLibCheck": true,
9-
"resolveJsonModule": true
9+
"resolveJsonModule": true,
10+
"strict": true
1011
}
1112
}

0 commit comments

Comments
 (0)