Skip to content

Commit

Permalink
Merge pull request #6 from Mehul2410/features/vallabh
Browse files Browse the repository at this point in the history
Features/vallabh
  • Loading branch information
Mehul Gawhale authored Sep 19, 2021
2 parents e619e30 + 0deb3cb commit cb8f9dd
Show file tree
Hide file tree
Showing 32 changed files with 7,652 additions and 1,180 deletions.
8 changes: 4 additions & 4 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
"slug": "BeSafe",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/logo.png",
"icon": "./img/logo.png",
"splash": {
"image": "./assets/logo.png",
"image": "./img/logo.png",
"resizeMode": "contain",
"backgroundColor": "#0085FF"
},
Expand All @@ -19,12 +19,12 @@
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/logo.png",
"foregroundImage": "./img/logo.png",
"backgroundColor": "#0085FF"
}
},
"web": {
"favicon": "./assets/logo.png"
"favicon": "./img/logo.png"
}
}
}
Binary file removed assets/adaptive-icon.png
Binary file not shown.
Binary file removed assets/favicon.png
Binary file not shown.
Binary file removed assets/icon.png
Binary file not shown.
1,135 changes: 0 additions & 1,135 deletions assets/lang.svg

This file was deleted.

Binary file removed assets/splash.png
Binary file not shown.
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = function (api) {
"@components": "./src/components",
"@types": "./src/types",
"@utils": "./src/utils",
"@assest": "/assets"
"@assets": "./src/assets"
}
}
]
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
"react-native-gesture-handler": "~1.10.2",
"react-native-gesture-handler": "^1.10.3",
"react-native-safe-area-context": "3.2.0",
"react-native-screens": "~3.4.0",
"react-native-web": "~0.13.12"
Expand Down
Binary file added src/assets/arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/citizen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
Binary file added src/assets/police.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/components/AppBootstrap/app-bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ type AppBootstrapProps = {

export default function AppBootstrap({ children }: AppBootstrapProps): ReactElement {
const [loaded] = useFonts({
"Chillax-Medium": require("../../../assets/fonts/Chillax-Medium.ttf"),
"Chillax-Regular": require("../../../assets/fonts/Chillax-Regular.ttf"),
"Chillax-Bold": require("../../../assets/fonts/Chillax-Bold.ttf"),
"Chillax-Light": require("../../../assets/fonts/Chillax-Light.ttf")
"Chillax-Medium": require("@assets/fonts/Chillax-Medium.ttf"),
"Chillax-Regular": require("@assets/fonts/Chillax-Regular.ttf"),
"Chillax-Bold": require("@assets/fonts/Chillax-Bold.ttf"),
"Chillax-Light": require("@assets/fonts/Chillax-Light.ttf")
});
return loaded ? <>{children}</> : <AppLoading />;
}
6 changes: 3 additions & 3 deletions src/components/background/Background.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { StatusBar } from "expo-status-bar";
import React, { ReactElement, ReactNode } from "react";
import { View, StyleSheet } from "react-native";
import { SafeAreaView, StyleSheet } from "react-native";

type background = {
children: ReactNode;
};

export default function Background({ children }: background): ReactElement {
return (
<View style={styles.screenview}>
<SafeAreaView style={styles.screenview}>
<StatusBar style="light" />
{children}
</View>
</SafeAreaView>
);
}

Expand Down
4 changes: 3 additions & 1 deletion src/config/Navigator.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { ReactElement } from "react";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import { Getstarted, Language } from "@screens";
import { Getstarted, Language, Register } from "@screens";
import { StackNavigatorParams } from "@types";

const Stack = createStackNavigator<StackNavigatorParams>();
Expand All @@ -10,13 +10,15 @@ export default function Navigator(): ReactElement {
return (
<NavigationContainer>
<Stack.Navigator
initialRouteName="Register"
screenOptions={{
headerMode: "screen",
headerShown: false
}}
>
<Stack.Screen name="Getstarted" component={Getstarted} />
<Stack.Screen name="Language" component={Language} />
<Stack.Screen name="Register" component={Register} />
</Stack.Navigator>
</NavigationContainer>
);
Expand Down
2 changes: 1 addition & 1 deletion src/screens/home/Getstarted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function Getstarted({ navigation }: LanguageNavigationProps<"Getstarted">
return (
<Background>
<ScrollView contentContainerStyle={styles.screenview}>
<Image source={require("../../../assets/getstarted.png")} />
<Image source={require("@assets/getstarted.png")} />
<Text weight="900" style={styles.landingtext}>
Welcome to
</Text>
Expand Down
1 change: 1 addition & 0 deletions src/screens/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { Getstarted } from "./home/Getstarted";
export { Language } from "./language/Language";
export { default as Register } from "./register/Register";
25 changes: 15 additions & 10 deletions src/screens/language/Language.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ import { LanguageNavigationProps } from "@types";
export function Language({ navigation }: LanguageNavigationProps<"Language">) {
return (
<Background>
<ScrollView contentContainerStyle={styles.screenview}>
<Image source={require("../../../assets/lang.png")} />
<Text style={styles.text}>Select your langague</Text>
<View style={styles.view}>
<Text style={styles.button}>English</Text>

<Text style={styles.button}>हिंदी</Text>

<Text style={styles.button}>मराठी</Text>
<View style={styles.screenview}>
<View style={styles.container1}>
<Image source={require("@assets/lang.png")} />
<Text style={styles.text}>Select your langague</Text>
</View>
<View style={styles.container2}>
<ScrollView contentContainerStyle={styles.scroll}>
<Text style={styles.button}>English</Text>
<Text style={styles.button}>हिंदी</Text>
<Text style={styles.button}>मराठी</Text>
<Text style={styles.button}>English</Text>
<Text style={styles.button}>हिंदी</Text>
<Text style={styles.button}>मराठी</Text>
</ScrollView>
</View>
</ScrollView>
</View>
</Background>
);
}
46 changes: 28 additions & 18 deletions src/screens/language/language.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,48 @@ import { StyleSheet } from "react-native";

const styles = StyleSheet.create({
screenview: {
width: "100%",
height: "100%",
display: "flex",
alignItems: "center",
justifyContent: "center",
width: "100%",
height: "100%"
justifyContent: "center"
},
scroll: {
width: "100%"
},
text: {
color: "#FFF"
color: "#FFF",
textAlign: "justify"
},
button: {
width: "100%",
maxWidth: 300,
display: "flex",
justifyContent: "center",
alignItems: "center",
width: 200,
maxWidth: 200,
textAlign: "center",
backgroundColor: "#FFF",
color: "#362C87",
margin: 10,
marginVertical: 10,
paddingVertical: 10,
paddingHorizontal: 30,
borderRadius: 10
},
view: {
flex: 1,
backgroundColor: "#1D0ECC",
borderTopRightRadius: 30,
borderTopLeftRadius: 30,
marginTop: 10,
container1: {
display: "flex",
width: "100%",
justifyContent: "flex-end",
alignItems: "center",
justifyContent: "center",
paddingBottom: 30,
flex: 1
},
container2: {
display: "flex",
width: "100%",
height: "auto"
justifyContent: "center",
alignItems: "center",
height: 300,
padding: 20,
backgroundColor: "#1D0ECC",
borderTopRightRadius: 50,
borderTopLeftRadius: 50
}
});

Expand Down
38 changes: 38 additions & 0 deletions src/screens/register/Register.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React from "react";
import { View, Image, TouchableOpacity } from "react-native";
import { Background, Text } from "@components";
import styles from "./register.styles";

export default function Register() {
return (
<Background>
<View style={styles.view}>
<Text weight="700">Select your role</Text>
<View style={styles.char}>
<Image source={require("@assets/police.png")}></Image>
<Text>police</Text>
</View>
<View style={styles.char}>
<Image source={require("@assets/citizen.png")}></Image>
<Text>citizen</Text>
</View>
<TouchableOpacity
style={{
display: "flex",
flexDirection: "row",
paddingVertical: 10,
paddingHorizontal: 30,
backgroundColor: "#1D0ECC",
borderRadius: 15
}}
>
<Text weight="700" style={styles.text}>
{" "}
Next
<Image source={require("@assets/arrow.png")} />
</Text>
</TouchableOpacity>
</View>
</Background>
);
}
22 changes: 22 additions & 0 deletions src/screens/register/register.styles.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { StyleSheet } from "react-native";

const styles = StyleSheet.create({
view: {
display: "flex",
width: "100%",
height: "100%",
alignItems: "center",
justifyContent: "center"
},
char: {
display: "flex",
alignItems: "center",
justifyContent: "center",
paddingVertical: 20
},
text: {
color: "#FFF"
}
});

export default styles;
1 change: 1 addition & 0 deletions src/types/navigationTypes/navigationTypes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { StackNavigationProp } from "@react-navigation/stack";
export type StackNavigatorParams = {
Getstarted: undefined;
Language: undefined;
Register: undefined;
};

export type LanguageNavigationProps<T extends keyof StackNavigatorParams> = {
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@types": ["src/types"],
"@utils": ["src/utils"],
"@contexts/*": ["src/contexts/*"],
"@assets/*": ["/assets/*"],
"@assets/*": ["src/assets/*"],
"@config/*": ["src/config/*"]
}
}
Expand Down
Loading

0 comments on commit cb8f9dd

Please sign in to comment.