-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinfo.js
115 lines (100 loc) · 3.2 KB
/
info.js
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
import { View, Text, Image, StyleSheet, Pressable } from 'react-native';
import React, { useState } from 'react';
import AppIntroSlider from 'react-native-app-intro-slider';
import { wp, hp } from '../../helpers/common'; // Assuming these helpers are available
import { theme } from '../../constants/theme'; // Assuming theme is defined similarly
import { useRouter } from 'expo-router';
const slides = [
{
id: 1,
title: 'Facilitate Communication',
description: 'Enabling seamless communication through real-time translation and interpretation services',
image: require('../../assets/images/info2.png'),
},
{
id: 2,
title: 'Promote Inclusivity ',
description: 'Fostering empathy and understanding by educating users on deaf culture and communication methods',
image: require('../../assets/images/info1.png'),
},
{
id: 3,
title: 'Empower Deaf Individuals',
description: 'Empowering deaf individuals to share their stories and connect with others, amplifying their voices in society',
image: require('../../assets/images/info3.png'),
},
];
const buttonLabel = (label) => {
return(
<View style={{
padding:12
}}>
<Text style={{
color: theme.colors.blue,
fontWeight: '600',
fontSize : theme.radius.xl,
}}>
{label}
</Text>
</View>
)
}
const InfoScreen = () => {
const router = useRouter();
return (
<AppIntroSlider
data={slides}
renderItem={({ item }) => (
<View style={styles.slide}>
<Image source={item.image} style={styles.image} resizeMode="contain" />
<Text style={styles.title}>{item.title}</Text>
<Text style={styles.description}>{item.description}</Text>
</View>
)}
onDone={() => router.push('/home/signin')} // Navigate to signin screen on done
showSkipButton={true}
onSkip={() => router.push('/home/signin')}
activeDotStyle={{ backgroundColor: theme.colors.blue ,
width : 30}} // Change color of the active dot
buttonTextStyle={{ color: theme.colors.blue}} // Change color of button text
buttonStyle={{ backgroundColor: theme.colors.blue }} // Change background color of button
renderDoneButton={() => buttonLabel("Done")}
renderNextButton={() => buttonLabel("Next")}
renderSkipButton={() => buttonLabel("Skip")}
/>
);
};
const styles = StyleSheet.create({
slide: {
flex: 1,
alignItems: 'center',
padding: 15,
paddingTop: 100,
},
image: {
width: wp(100),
height: hp(50), // Adjusted height to fit within the screen
},
title: {
fontSize: hp(4),
fontWeight: 'bold',
color: theme.colors.neutral(0.9),
marginTop: 20,
},
description: {
fontSize: hp(2.5),
textAlign: 'center',
marginTop: 10,
color: theme.colors.neutral(0.7),
},
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
infoText: {
fontSize: hp(3),
fontWeight: 'semi bold',
},
});
export default InfoScreen;