Skip to content

Commit e09e174

Browse files
feat: upgrade expo app version + react native paper
1 parent fea88df commit e09e174

File tree

7 files changed

+646
-476
lines changed

7 files changed

+646
-476
lines changed

example/package.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212
"test": "jest"
1313
},
1414
"dependencies": {
15-
"expo": "^46.0.0",
16-
"expo-splash-screen": "~0.16.1",
17-
"react": "18.0.0",
18-
"react-dom": "18.0.0",
19-
"react-native": "0.69.4",
15+
"expo": "^47.0.0",
16+
"expo-splash-screen": "~0.17.5",
17+
"react": "18.1.0",
18+
"react-dom": "18.1.0",
19+
"react-native": "0.70.5",
2020
"react-native-paper": "^4.12.4",
21+
"react-native-safe-area-context": "4.4.1",
2122
"react-native-web": "~0.18.7"
2223
},
2324
"devDependencies": {
24-
"@babel/core": "^7.18.6",
25+
"@babel/core": "^7.19.3",
2526
"@babel/runtime": "^7.9.6",
2627
"babel-plugin-module-resolver": "^4.0.0",
27-
"babel-preset-expo": "~9.2.0",
28+
"babel-preset-expo": "~9.2.1",
2829
"expo-cli": "^6.0.5"
2930
}
3031
}

example/src/App.tsx

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ import {
88
Animated,
99
useColorScheme,
1010
} from 'react-native'
11+
import { SafeAreaProvider } from 'react-native-safe-area-context'
1112

1213
import {
1314
Title,
1415
Button,
1516
Text,
1617
Provider as PaperProvider,
17-
DefaultTheme,
18-
DarkTheme,
1918
useTheme,
2019
overlay,
2120
Paragraph,
@@ -395,34 +394,12 @@ function Label({ children }: { children: string }) {
395394
}
396395

397396
export default function AppWithProviders() {
398-
const dark = useColorScheme() === 'dark'
399-
400397
return (
401-
<PaperProvider
402-
theme={
403-
dark
404-
? {
405-
...DarkTheme,
406-
roundness: 10,
407-
colors: {
408-
...DarkTheme.colors,
409-
// primary: '#F59E00',
410-
// accent: '#FBBE5E',
411-
},
412-
}
413-
: {
414-
...DefaultTheme,
415-
roundness: 10,
416-
colors: {
417-
...DefaultTheme.colors,
418-
// primary: '#F59E00',
419-
// accent: '#FBBE5E',
420-
},
421-
}
422-
}
423-
>
424-
<App />
425-
</PaperProvider>
398+
<SafeAreaProvider>
399+
<PaperProvider>
400+
<App />
401+
</PaperProvider>
402+
</SafeAreaProvider>
426403
)
427404
}
428405

0 commit comments

Comments
 (0)