Skip to content

Commit 73ae9dc

Browse files
committed
✨ (Example) init expo project with example
1 parent 589b314 commit 73ae9dc

16 files changed

Lines changed: 7788 additions & 1373 deletions

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ indent_style = space
66
indent_size = 2
77
end_of_line = lf
88
charset = utf-8
9-
trim_trailing_whitespace = true
9+
trim_trailing_whitespace = false
1010
insert_final_newline = true
1111

1212
[*.md]

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
**/node_modules
2+
./example/metro.config.js
3+
./example/babel.config.js

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
11
node_modules/**/*
22
npm-debug.*
33
.idea
4+
5+
example/node_modules/**/*
6+
example/.expo/*
7+
example/.expo-shared/*
8+
example/npm-debug.*
9+
example/*.jks
10+
example/*.p8
11+
example/*.p12
12+
example/*.key
13+
example/*.mobileprovision
14+
example/*.orig.*
15+
example/web-build/
16+
17+
# macOS
18+
example/.DS_Store

example/App.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import React from 'react';
2+
import { Text, TouchableOpacity, View } from 'react-native';
3+
4+
// @ts-ignore
5+
import HeaderImageScrollView, { TriggeringView } from 'react-native-image-header-scroll-view';
6+
7+
export default function App() {
8+
return (
9+
<HeaderImageScrollView
10+
maxHeight={200}
11+
minHeight={56}
12+
headerImage={require('./assets/NZ.jpg')}
13+
renderForeground={() => (
14+
<View style={{ height: 150, justifyContent: 'center', alignItems: 'center' }}>
15+
<TouchableOpacity onPress={() => console.log('tap!!')}>
16+
<Text style={{ backgroundColor: 'transparent' }}>Tap Me!</Text>
17+
</TouchableOpacity>
18+
</View>
19+
)}
20+
>
21+
<View style={{ height: 1000 }}>
22+
<TriggeringView onHide={() => console.log('text hidden')}>
23+
<Text>Scroll Me!</Text>
24+
</TriggeringView>
25+
</View>
26+
</HeaderImageScrollView>
27+
);
28+
}

example/app.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"expo": {
3+
"name": "example",
4+
"slug": "example",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/icon.png",
8+
"splash": {
9+
"image": "./assets/splash.png",
10+
"resizeMode": "contain",
11+
"backgroundColor": "#ffffff"
12+
},
13+
"updates": {
14+
"fallbackToCacheTimeout": 0
15+
},
16+
"assetBundlePatterns": ["**/*"],
17+
"ios": {
18+
"supportsTablet": true
19+
},
20+
"android": {
21+
"adaptiveIcon": {
22+
"foregroundImage": "./assets/adaptive-icon.png",
23+
"backgroundColor": "#FFFFFF"
24+
}
25+
},
26+
"web": {
27+
"favicon": "./assets/favicon.png"
28+
}
29+
}
30+
}

example/assets/NZ.jpg

128 KB
Loading

example/assets/adaptive-icon.png

17.1 KB
Loading

example/assets/favicon.png

1.43 KB
Loading

example/assets/icon.png

21.9 KB
Loading

example/assets/splash.png

47.3 KB
Loading

0 commit comments

Comments
 (0)