-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.jsx
More file actions
194 lines (183 loc) · 5.12 KB
/
index.jsx
File metadata and controls
194 lines (183 loc) · 5.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
// // screens/HomeScreen.js
// import React, { useState } from 'react';
// import { View, StyleSheet } from 'react-native';
// import { TextInput, Button, Title } from 'react-native-paper';
// export default function HomeScreen({ navigation }) {
// const [dateOfBirth, setDateOfBirth] = useState('');
// const [timeOfBirth, setTimeOfBirth] = useState('');
// const [placeOfBirth, setPlaceOfBirth] = useState('');
// const handleCalculateKundali = () => {
// navigation.navigate('Kundali', {
// dateOfBirth,
// timeOfBirth,
// placeOfBirth,
// });
// };
// return (
// <View style={styles.container}>
// <Title style={styles.title}>Enter Your Birth Details</Title>
// <TextInput
// label="Date of Birth (YYYY-MM-DD)"
// value={dateOfBirth}
// onChangeText={setDateOfBirth}
// mode="outlined"
// style={styles.input}
// />
// <TextInput
// label="Time of Birth (HH:MM)"
// value={timeOfBirth}
// onChangeText={setTimeOfBirth}
// mode="outlined"
// style={styles.input}
// />
// <TextInput
// label="Place of Birth"
// value={placeOfBirth}
// onChangeText={setPlaceOfBirth}
// mode="outlined"
// style={styles.input}
// />
// <Button mode="contained" onPress={handleCalculateKundali} style={styles.button}>
// Calculate Kundali
// </Button>
// </View>
// );
// }
// const styles = StyleSheet.create({
// container: {
// flex: 1,
// padding: 20,
// backgroundColor: '#fff',
// },
// title: {
// marginVertical: 20,
// textAlign: 'center',
// },
// input: {
// marginBottom: 15,
// },
// button: {
// marginTop: 20,
// },
// });
// app/index.js
import React, { useState } from 'react';
import { View, StyleSheet } from 'react-native';
import { TextInput, Button, Title } from 'react-native-paper';
import { useRouter } from 'expo-router';
export default function HomeScreen() {
const [dateOfBirth, setDateOfBirth] = useState('');
const [timeOfBirth, setTimeOfBirth] = useState('');
const [placeOfBirth, setPlaceOfBirth] = useState('');
const router = useRouter();
const handleCalculateKundali = () => {
router.push({
pathname: '/KundaliScreen',
params: {
dateOfBirth,
timeOfBirth,
placeOfBirth,
},
});
};
return (
<View style={styles.container}>
<Title style={styles.title}>Enter Your Birth Details</Title>
<TextInput
label="Date of Birth (YYYY-MM-DD)"
value={dateOfBirth}
onChangeText={setDateOfBirth}
mode="outlined"
style={styles.input}
/>
<TextInput
label="Time of Birth (HH:MM)(24H)"
value={timeOfBirth}
onChangeText={setTimeOfBirth}
mode="outlined"
style={styles.input}
/>
<TextInput
label="Place of Birth"
value={placeOfBirth}
onChangeText={setPlaceOfBirth}
mode="outlined"
style={styles.input}
/>
<Button mode="contained" onPress={handleCalculateKundali} style={styles.button}>
Calculate Kundali
</Button>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
padding: 20,
backgroundColor: '#F3F4F6', // Light gray background for a clean, neutral look
},
title: {
marginVertical: 20,
textAlign: 'center',
fontSize: 28,
fontWeight: 'bold',
color: '#4A4A4A', // Darker shade for the title
},
input: {
marginBottom: 15,
padding: 15,
borderRadius: 12, // Rounded corners for a softer appearance
backgroundColor: '#FFFFFF', // White background for contrast
shadowColor: '#000', // Light shadow for depth
shadowOffset: { width: 0, height: 4 },
shadowOpacity: 0.1,
shadowRadius: 8,
elevation: 4, // Android shadow
borderWidth: 1,
borderColor: '#E0E0E0', // Border for subtle definition
},
button: {
marginTop: 30,
paddingVertical: 14,
paddingHorizontal: 20,
borderRadius: 10, // Rounded button with a medium radius
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#6A1B9A', // Bold gradient color for vibrance
shadowColor: '#6A1B9A',
shadowOffset: { width: 0, height: 4 },
shadowOpacity: 0.3,
shadowRadius: 6,
elevation: 6, // Higher elevation for standout effect
},
buttonGradient: {
borderRadius: 10, // Match button radius for gradient styling
paddingVertical: 14,
paddingHorizontal: 20,
alignItems: 'center',
justifyContent: 'center',
},
buttonText: {
color: '#FFFFFF', // White text color for contrast
fontSize: 18,
fontWeight: 'bold',
letterSpacing: 0.8, // Slight letter spacing for a polished look
},
subtitle: {
fontSize: 16,
color: '#7D7D7D', // Subtle color for less emphasis
textAlign: 'center',
marginBottom: 10,
},
card: {
padding: 20,
borderRadius: 16,
backgroundColor: '#FFF',
marginVertical: 10,
shadowColor: '#000',
shadowOffset: { width: 0, height: 6 },
shadowOpacity: 0.1,
shadowRadius: 10,
elevation: 5,
},
});