-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into ft-setup-fingerprint
- Loading branch information
Showing
9 changed files
with
296 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,4 +38,4 @@ yarn-error.* | |
# The following patterns were generated by expo-cli | ||
|
||
expo-env.d.ts | ||
# @end expo-cli | ||
# @end expo-cli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React, {useContext, useState} from 'react' | ||
import { StyleSheet, Text, View } from 'react-native' | ||
import { Colors } from '@/constants/Colors' | ||
import OnboardingComponent from '@/components/OnBoarding/OnboardingComponent'; | ||
import { ThemeContext } from '@/ctx/ThemeContext'; | ||
|
||
const image = require("../../assets/images/OnBoardingImages/firstLightImg.png") | ||
const darkImg = require("../../assets/images/OnBoardingImages/firstDarkImg.png") | ||
|
||
const FirstScreen = () => { | ||
const {theme, changeTheme} = useContext(ThemeContext) | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<OnboardingComponent | ||
image={theme === "dark" ? darkImg : image} | ||
text="Thousands of doctors & experts to help your health!" | ||
action="Next" | ||
direction="/onBoarding/SecondScreen" | ||
> | ||
<Text style={[styles.dots, {width: 30, backgroundColor: Colors.main.primary._500}]}></Text> | ||
<Text style={styles.dots}></Text> | ||
<Text style={styles.dots}></Text> | ||
</OnboardingComponent> | ||
|
||
</View> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
|
||
container: { | ||
flex: 1, | ||
alignItems: "center", | ||
}, | ||
|
||
dots: { | ||
width: 10, | ||
height: 10, | ||
backgroundColor: Colors.grayScale._300, | ||
borderRadius: 100, | ||
marginHorizontal: 3 | ||
}, | ||
}) | ||
|
||
export default FirstScreen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React, { useContext, useRef, useState } from 'react' | ||
import { View, StyleSheet, FlatList, Animated, Image, Pressable, Text, SafeAreaView } from 'react-native' | ||
import { Colors } from '@/constants/Colors' | ||
import OnboardingComponent from '@/components/OnBoarding/OnboardingComponent'; | ||
import { ThemeContext } from '@/ctx/ThemeContext'; | ||
|
||
const image = require("../../assets/images/OnBoardingImages/secondLightImg.png") | ||
const darkImg = require("../../assets/images/OnBoardingImages/secondDarkImg.png") | ||
|
||
const SecondScreen = () => { | ||
const {theme, changeTheme} = useContext(ThemeContext) | ||
|
||
return ( | ||
<View> | ||
<OnboardingComponent | ||
image={theme === "dark" ? darkImg : image} | ||
text="Health checks & consultations easily anywhere anytime" | ||
action="Next" | ||
direction="/onBoarding/ThirdScreen"> | ||
|
||
<Text style={styles.dots}></Text> | ||
<Text style={[styles.dots, {width: 30, backgroundColor: Colors.main.primary._500}]}></Text> | ||
<Text style={styles.dots}></Text> | ||
</OnboardingComponent> | ||
</View> | ||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
|
||
container: { | ||
flex: 1, | ||
alignItems: "center", | ||
}, | ||
dots: { | ||
width: 10, | ||
height: 10, | ||
backgroundColor: Colors.grayScale._300, | ||
borderRadius: 100, | ||
marginHorizontal: 3 | ||
}, | ||
|
||
}) | ||
|
||
export default SecondScreen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import React, { useContext, useState } from 'react' | ||
import { StyleSheet,SafeAreaView,Text, View } from 'react-native' | ||
import { Colors } from '@/constants/Colors' | ||
import OnboardingComponent from '@/components/OnBoarding/OnboardingComponent' | ||
import { ThemeContext } from '@/ctx/ThemeContext' | ||
|
||
const image = require("../../assets/images/OnBoardingImages/thirdLightImg.png") | ||
const darkImg = require("../../assets/images/OnBoardingImages/thirdDarkImg.png") | ||
|
||
|
||
const ThirdScreen = () => { | ||
const {theme, changeTheme} = useContext(ThemeContext) | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<OnboardingComponent | ||
image={ theme=== "dark" ? darkImg : image} | ||
text="Let's start living healthy and well with us right now!" | ||
action="Get Started" | ||
direction="/" | ||
> | ||
<Text style={styles.dots}></Text> | ||
<Text style={styles.dots}></Text> | ||
<Text style={[styles.dots, {width: 30, backgroundColor:Colors.main.primary._500}]}></Text> | ||
</OnboardingComponent> | ||
</View> | ||
|
||
) | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
|
||
container: { | ||
flex: 1, | ||
alignItems: "center", | ||
}, | ||
dots: { | ||
width: 10, | ||
height: 10, | ||
backgroundColor: Colors.grayScale._300, | ||
borderRadius: 100, | ||
marginHorizontal: 3 | ||
} | ||
}) | ||
|
||
export default ThirdScreen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from "react"; | ||
import FontAwesome from "@expo/vector-icons/FontAwesome"; | ||
import { Link, Stack } from "expo-router"; | ||
import { Pressable } from "react-native"; | ||
|
||
|
||
// You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/ | ||
function TabBarIcon(props: { | ||
name: React.ComponentProps<typeof FontAwesome>["name"]; | ||
color: string; | ||
}) { | ||
return <FontAwesome size={28} style={{ marginBottom: -3 }} {...props} />; | ||
} | ||
|
||
export default function TabLayout() { | ||
|
||
return ( | ||
<Stack> | ||
<Stack.Screen | ||
name="FirstScreen" | ||
options={{ | ||
title: "onBoarding page", | ||
headerShown: false, | ||
}} | ||
/> | ||
|
||
<Stack.Screen | ||
name="SecondScreen" | ||
options={{ | ||
title: "onBoarding page", | ||
headerShown: false, | ||
}} | ||
/> | ||
|
||
<Stack.Screen | ||
name="ThirdScreen" | ||
options={{ | ||
title: "onBoarding page", | ||
headerShown: false, | ||
}} | ||
/> | ||
</Stack> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
import React, { ReactElement, useContext, useRef, useState } from "react"; | ||
import { | ||
View, | ||
StyleSheet, | ||
FlatList, | ||
Animated, | ||
Image, | ||
Pressable, | ||
Text, | ||
} from "react-native"; | ||
import { Colors } from "@/constants/Colors"; | ||
import { router } from "expo-router"; | ||
import { ThemeContext } from "@/ctx/ThemeContext"; | ||
|
||
const OnboardingComponent = ({ | ||
image, | ||
text, | ||
action, | ||
direction, | ||
children, | ||
}: { | ||
image: any; | ||
text: string; | ||
action: string; | ||
direction: any; | ||
children: React.ReactNode; | ||
}) => { | ||
const { theme, changeTheme } = useContext(ThemeContext); | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<View style={styles.img}> | ||
<Image source={image} /> | ||
</View> | ||
<View style={styles.LowerSection}> | ||
<Text style={theme === "light" ? styles.titleDark : styles.titleLight}> | ||
{text} | ||
</Text> | ||
<View style={{ flexDirection: "row", alignSelf: "center" }}> | ||
{children} | ||
</View> | ||
<Pressable onPress={() => router.push(direction)} style={styles.btn}> | ||
<Text style={styles.btnText}>{action}</Text> | ||
</Pressable> | ||
</View> | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
paddingHorizontal: "5%", | ||
paddingVertical: "20%", | ||
}, | ||
|
||
img: { | ||
paddingHorizontal: 8, | ||
alignSelf: "center", | ||
}, | ||
|
||
LowerSection: { | ||
flexDirection: "column", | ||
gap: 48, | ||
paddingVertical: 48, | ||
}, | ||
|
||
titleLight: { | ||
color: Colors.main.primary._500, | ||
fontSize: 40, | ||
paddingHorizontal: 8, | ||
textAlign: "center", | ||
fontFamily: "Bold", | ||
}, | ||
|
||
titleDark: { | ||
color: Colors.others.white, | ||
fontSize: 40, | ||
paddingHorizontal: 8, | ||
textAlign: "center", | ||
fontWeight: "bold", | ||
}, | ||
|
||
dots: { | ||
width: 10, | ||
height: 10, | ||
backgroundColor: Colors.grayScale._300, | ||
borderRadius: 100, | ||
marginHorizontal: 3, | ||
}, | ||
|
||
btn: { | ||
backgroundColor: Colors.main.primary._500, | ||
textAlign: "center", | ||
padding: 18, | ||
borderRadius: 100, | ||
alignContent: "flex-end", | ||
}, | ||
|
||
btnText: { | ||
color: Colors.others.white, | ||
alignSelf: "center", | ||
fontSize: 16, | ||
fontWeight: "bold", | ||
}, | ||
}); | ||
|
||
export default OnboardingComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters