Skip to content

Commit 129611f

Browse files
authored
chore: updated examples to use expo only (#1668)
* chore: updated example to use expo and removed rn bare project * chore: updated expo v50 * chore: updated map example * chore: updated view pager example * chore: updated react navigation example * chore: updated native screens example * chore: updated dependencies
1 parent e190f4e commit 129611f

File tree

197 files changed

+3208
-6387
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+3208
-6387
lines changed

example/.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
11+
# Native
12+
*.orig.*
13+
*.jks
14+
*.p8
15+
*.p12
16+
*.key
17+
*.mobileprovision
18+
19+
# Metro
20+
.metro-health-check*
21+
22+
# debug
23+
npm-debug.*
24+
yarn-debug.*
25+
yarn-error.*
26+
27+
# macOS
28+
.DS_Store
29+
*.pem
30+
31+
# local env files
32+
.env*.local
33+
34+
# typescript
35+
*.tsbuildinfo
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
import React, { useMemo } from 'react';
2-
import { StyleSheet } from 'react-native';
1+
import React from 'react';
32
import { ShowcaseApp } from '@gorhom/showcase-template';
4-
import { screens as defaultScreens } from './screens';
5-
import { version, description } from '../../../package.json';
3+
import { screens } from './src/screens';
4+
import { version, description } from '../package.json';
5+
66
import { GestureHandlerRootView } from 'react-native-gesture-handler';
77

8+
import { enableScreens } from 'react-native-screens';
9+
enableScreens(true);
10+
11+
// @ts-ignore
12+
import { enableLogging } from '@gorhom/bottom-sheet';
13+
enableLogging();
14+
15+
import { StyleSheet } from 'react-native';
16+
817
const author = {
918
username: 'Mo Gorhom',
1019
url: 'https://gorhom.dev',
1120
};
1221

13-
interface AppProps {
14-
screens?: any[];
15-
}
16-
17-
export const App = ({ screens: providedScreens }: AppProps) => {
18-
const screens = useMemo(
19-
() => [...defaultScreens, ...(providedScreens ? providedScreens : [])],
20-
[providedScreens]
21-
);
22+
export default function App() {
2223
return (
2324
<GestureHandlerRootView style={styles.container}>
2425
<ShowcaseApp
@@ -30,11 +31,10 @@ export const App = ({ screens: providedScreens }: AppProps) => {
3031
/>
3132
</GestureHandlerRootView>
3233
);
33-
};
34+
}
3435

3536
const styles = StyleSheet.create({
3637
container: {
3738
flex: 1,
38-
flexGrow: 1,
3939
},
4040
});

example/app.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"expo": {
3+
"name": "BottomSheet",
4+
"slug": "BottomSheet",
5+
"githubUrl": "https://github.com/gorhom/react-native-bottom-sheet",
6+
"version": "5.0.0",
7+
"orientation": "portrait",
8+
"icon": "./assets/icon.png",
9+
"userInterfaceStyle": "automatic",
10+
"splash": {
11+
"image": "./assets/splash.png",
12+
"resizeMode": "contain",
13+
"backgroundColor": "#000"
14+
},
15+
"assetBundlePatterns": [
16+
"**/*"
17+
],
18+
"ios": {
19+
"supportsTablet": true,
20+
"bundleIdentifier": "dev.gorhom.bottomsheet"
21+
},
22+
"android": {
23+
"adaptiveIcon": {
24+
"foregroundImage": "./assets/adaptive-icon.png",
25+
"backgroundColor": "#000"
26+
},
27+
"package": "dev.gorhom.bottomsheet"
28+
},
29+
"web": {
30+
"favicon": "./assets/favicon.png"
31+
}
32+
}
33+
}

example/app/package.json

Lines changed: 0 additions & 38 deletions
This file was deleted.

example/app/src/index.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

example/app/src/screens/index.ts

Lines changed: 0 additions & 124 deletions
This file was deleted.

example/app/tsconfig.json

Lines changed: 0 additions & 36 deletions
This file was deleted.

example/assets/adaptive-icon.png

27.9 KB
Loading

example/assets/icon.png

32.8 KB
Loading

0 commit comments

Comments
 (0)