mirror of
https://github.com/mudabbir-ahmad/MAD-Treasure-Hunt.git
synced 2026-10-08 03:00:20 +00:00
Add ScreenHeader component and update page layouts for consistent header usage
This commit is contained in:
1 parent
33f73105ad
commit
1bd640f8d5
14 files changed
+219
-180
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import React from 'react';
|
||||
import { View, Text, StyleSheet } from 'react-native';
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
||||
|
||||
const ScreenHeader = ({ title }) => {
|
||||
const insets = useSafeAreaInsets();
|
||||
|
||||
return (
|
||||
<View style={[styles.container, { paddingTop: insets.top + 10 }]}>
|
||||
<Text style={styles.title}>{title}</Text>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
container: {
|
||||
backgroundColor: '#000000',
|
||||
paddingHorizontal: 16,
|
||||
paddingBottom: 12,
|
||||
minHeight: 72,
|
||||
justifyContent: 'flex-end',
|
||||
},
|
||||
title: {
|
||||
color: '#ffffff',
|
||||
fontSize: 20,
|
||||
fontWeight: '700',
|
||||
},
|
||||
});
|
||||
|
||||
export default ScreenHeader;
|
||||
|
||||
Reference in new issue
Block a user