diff options
author | Santo Cariotti <santo@dcariotti.me> | 2024-09-08 10:55:09 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2024-09-08 10:55:09 +0200 |
commit | 63ecdd1f817fd09317695a4c07d411db7ab49bd6 (patch) | |
tree | e442d4b0938765ab57ee9bffcada2a30a1cca542 | |
parent | 49e6fe16cbc1766b14f4add7e7d45e508c338dc6 (diff) |
Use SafeAreaView for header
-rw-r--r-- | components/ParallaxScrollView.tsx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/ParallaxScrollView.tsx b/components/ParallaxScrollView.tsx index 2d5e379..b90a75b 100644 --- a/components/ParallaxScrollView.tsx +++ b/components/ParallaxScrollView.tsx @@ -1,5 +1,5 @@ import type { PropsWithChildren, } from 'react'; -import { StyleSheet, View, useColorScheme } from 'react-native'; +import { StyleSheet, SafeAreaView, useColorScheme } from 'react-native'; import { ThemedView } from '@/components/ThemedView'; import { ThemedText } from './ThemedText'; @@ -14,13 +14,11 @@ export default function ParallaxScrollView({ return ( <ThemedView style={styles.container}> - <View style={{ - paddingTop: 50, - padding: 10, + <SafeAreaView style={{ backgroundColor: (theme === 'light' ? 'rgba(0, 0, 0, .5)' : 'rgba(100, 100, 100, .5)'), }}> <ThemedText type="title" style={{ color: 'white' }}>CAS4</ThemedText> - </View> + </SafeAreaView> <ThemedView style={styles.content}>{children}</ThemedView> </ThemedView> ); |