Skip to content

Commit 1060e46

Browse files
committed
update home screen styling 😍🐀
1 parent 5a465ef commit 1060e46

File tree

4 files changed

+42
-19
lines changed

4 files changed

+42
-19
lines changed

β€ŽApp.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default function App() {
4949
<NavigationContainer>
5050
<QueryClientProvider client={ client }>
5151
<Stack.Navigator>
52-
<Stack.Screen name='Home' component={ Home } />
52+
<Stack.Screen name='Home' component={ Home } options={{ headerShown: false }} />
5353
<Stack.Screen name='Quran' component={ Quran } />
5454
<Stack.Screen name='Dua' component={ Doa } />
5555
<Stack.Screen name='DuaDetal' component={ DoaDetails } />

β€Žcomponents/screens/home/Home.tsxβ€Ž

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import Slider from '@react-native-community/slider';
2-
import { useEffect } from 'react'
32
import { View, Text, StyleSheet, Pressable, ScrollView } from 'react-native'
43
import { useRootStore } from '../../../model/root';
54
import { observer } from 'mobx-react-lite';
65
import { AZKARSALAT } from '../../../assets/AzkarSalat';
76
import RandomZekr from './randomZekr/RandomZekr';
87
import { StatusBar } from 'expo-status-bar';
8+
import Header from "./header/Header";
99

1010
const Home = observer(({ navigation }: any) => {
1111

@@ -15,23 +15,10 @@ const Home = observer(({ navigation }: any) => {
1515
root.setFontSize(Math.floor(value))
1616
}
1717

18-
useEffect(()=> {
19-
navigation.setOptions({
20-
title: "Muslim",
21-
headerStyle: styles.header,
22-
headerTitleStyle:{
23-
color: '#fff',
24-
fontFamily: 'Amiri',
25-
fontSize: 24,
26-
fontWeight: '200',
27-
},
28-
headerTintColor: '#0B2239',
29-
});
30-
}, [ root ])
31-
3218
return (
3319
<ScrollView contentContainerStyle={{ alignItems: "center", justifyContent: "center", minHeight: "100%" }} style={ styles.container }>
34-
<StatusBar style="light" />
20+
{/* <StatusBar style="light" /> */}
21+
<Header />
3522
<Text style={ styles.heading }>بِسْمِ Ψ§Ω„Ω„Ω‘ΩŽΩ€Ω‡Ω Ψ§Ω„Ψ±Ω‘ΩŽΨ­Ω’Ω…ΩŽΩ€Ω°Ω†Ω Ψ§Ω„Ψ±Ω‘ΩŽΨ­ΩΩŠΩ…Ω</Text>
3623
<Text style={{ color: "#0B2239" }}>what would you like to see?</Text>
3724
<View style={ styles.butons }>
@@ -81,7 +68,7 @@ const styles = StyleSheet.create({
8168
marginVertical: 20,
8269
minWidth: 150,
8370
backgroundColor: '#0B2239',
84-
borderRadius: 50,
71+
borderRadius: 5,
8572
paddingHorizontal: 20,
8673
marginHorizontal: 5,
8774
},
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import { View, Text, StyleSheet, Image } from 'react-native'
2+
3+
const Header = () => {
4+
return (
5+
<View style={ styles.wrapper }>
6+
<Text style={ styles.text }>Muslim</Text>
7+
<Image style={ styles.icon } source={require('../../../../assets/icon.png')} />
8+
</View>
9+
)
10+
}
11+
12+
const styles = StyleSheet.create({
13+
wrapper: {
14+
position: 'absolute',
15+
top: 5,
16+
backgroundColor: '#0B2239',
17+
height: 40,
18+
borderRadius: 5,
19+
width: "98%",
20+
justifyContent: 'space-between',
21+
alignItems: 'center',
22+
flexDirection: 'row',
23+
paddingHorizontal: 10
24+
},
25+
icon: {
26+
width: 30,
27+
height: 30,
28+
borderRadius: 50
29+
},
30+
text: {
31+
color: '#fff',
32+
fontWeight: 'bold'
33+
}
34+
})
35+
36+
export default Header

β€Žcomponents/screens/home/randomZekr/RandomZekr.tsxβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const styles = StyleSheet.create({
2828
width: 350,
2929
backgroundColor: '#0B2239',
3030
marginVertical: 2,
31-
borderRadius: 10
31+
borderRadius: 5
3232
},
3333
text: {
3434
color: '#fff',

0 commit comments

Comments
Β (0)