Skip to content

Commit

Permalink
added other info screen
Browse files Browse the repository at this point in the history
  • Loading branch information
KingPleather committed Jul 12, 2024
1 parent 7f0d92d commit fea2db8
Show file tree
Hide file tree
Showing 9 changed files with 2,408 additions and 3,686 deletions.
20 changes: 11 additions & 9 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ import DonateScreen from "./src/screens/DonateScreen";
import WebsitesScreen from "./src/screens/WebsitesScreen";
import VolunteerFormScreen from "./src/screens/VolunteerFormScreen";

import VolunteerOpportunityScreen from "./src/screens/VolunteerOpportunityScreen";
import OtherInfoScreen from "./src/screens/OtherInfoScreen";

const Stack = createNativeStackNavigator();

export default function App() {
return (
// <NavigationContainer>
// <Stack.Navigator initialRouteName="Home">
// <Stack.Screen name="Home" component={HomeScreen} />
// <Stack.Screen name="Sign In" component={SignInScreen} />
// <Stack.Screen name="Donate" component={DonateScreen} />
// <Stack.Screen name="Websites" component={WebsitesScreen} />
// </Stack.Navigator>
// </NavigationContainer>
<VolunteerFormScreen></VolunteerFormScreen>
<NavigationContainer>
<Stack.Navigator initialRouteName="Other Info">
<Stack.Screen name="Home" component={HomeScreen} />
<Stack.Screen name="Donate" component={DonateScreen} />
<Stack.Screen name="Websites" component={WebsitesScreen} />
<Stack.Screen name="Other Info" component={OtherInfoScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}
5,865 changes: 2,196 additions & 3,669 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@
},
"dependencies": {
"@expo/metro-runtime": "^3.2.1",
"@react-native-community/cli-server-api": "^13.6.9",
"@react-native-google-signin/google-signin": "^12.2.1",
"@react-navigation/native": "^6.1.17",
"@react-navigation/native-stack": "^6.10.0",
"expo": "~51.0.17",
"expo-checkbox": "~3.0.0",
"expo-constants": "^16.0.2",
"expo-linear-gradient": "^13.0.2",
"expo-status-bar": "~1.12.1",
Expand Down
9 changes: 7 additions & 2 deletions src/components/BackButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ export default function BackButton(props) {
>
<Image
source={require("./../assets/caret-left.png")}
style={props.opaque ? { tintColor: "white" } : {}}
style={props.opaque || props.white ? { tintColor: "white" } : {}}
/>
<Text style={[styles.backText, props.opaque ? { color: "white" } : {}]}>
<Text
style={[
styles.backText,
props.opaque || props.white ? { color: "white" } : {},
]}
>
Back
</Text>
</View>
Expand Down
46 changes: 46 additions & 0 deletions src/components/CheckBoxQuery.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { StyleSheet, Text, TextInput, View } from "react-native";
import { Checkbox } from "expo-checkbox";
import { useState } from "react";

export default function CheckBoxQuery(props) {
const [yes, setYes] = useState(false);
const [no, setNo] = useState(false);

return (
// TODO
<View style={styles.container}>
<Text style={[styles.text, { paddingBottom: "2%" }]}>
{props.question}
<Text style={[styles.text, styles.red]}>*</Text>
</Text>
<View style={{ flexDirection: "row", paddingVertical: "1%" }}>
<Checkbox
color={"#0d79ff"}
value={yes}
onValueChange={setYes}
style={{ borderRadius: 20, transform: [{ scale: 1.3 }] }}
/>
<Text style={[styles.text, { paddingHorizontal: "3%" }]}>Yes</Text>
<Checkbox
color={"#0d79ff"}
value={no}
onValueChange={setNo}
style={{ borderRadius: 20, transform: [{ scale: 1.3 }] }}
/>
<Text style={[styles.text, { paddingHorizontal: "3%" }]}>No</Text>
</View>
</View>
);
}

const styles = StyleSheet.create({
red: {
color: "red",
},
container: {
flexGrow: 1,
},
text: {
fontSize: 14,
},
});
7 changes: 4 additions & 3 deletions src/components/NextButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { StyleSheet, Text, View, Image } from "react-native";
export default function NextButton() {
return (
<View style={styles.back}>
<Text style={styles.backText}>{"Next"}</Text>
<Text style={styles.nextText}>{"Next"}</Text>
<Image
source={require("./../assets/caret-left.png")}
style={styles.caret}
Expand All @@ -16,14 +16,15 @@ const styles = StyleSheet.create({
back: {
flexDirection: "row",
alignItems: "center",
justifyContent: "flex-end",
justifyContent: "center",
borderRadius: 15,
height: 60,
width: 120,
backgroundColor: "black",
paddingLeft: "4%",
},

backText: {
nextText: {
fontSize: 25,
color: "white",
},
Expand Down
5 changes: 2 additions & 3 deletions src/components/TextField.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@ export default function TextField({
return (
// TODO
<View>
<Text style={{ fontSize: 25 }}>
<Text style={{ fontSize: 14 }}>
<Text>{title}</Text>
<Text style={{ color: "red" }}> *</Text>
<Text style={{ fontSize: 20, color: "#707070" }}>{subtitle}</Text>
</Text>
<Text style={{ fontSize: 1 }}>{"\n"}</Text>
<Text style={{ fontSize: 20, color: "#707070" }}>{subtitle}</Text>
<TextInput
style={[styles.inputField, { borderColor: borderColor }]}
onChangeText={(text) => setText(text)}
Expand Down
34 changes: 34 additions & 0 deletions src/components/UploadButton.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { StyleSheet, Text, View, Image } from "react-native";

export default function UploadButton() {
return (
<View style={styles.back}>
<Image
source={require("./../assets/upload.png")}
style={{height:30,width:30}}
/>
<Text style={styles.backText}>
Upload
</Text>
</View>
);
}

const styles = StyleSheet.create({
back: {
flexDirection: "row",
justifyContent: "flex-start",
alignItems:"center",
alignSelf: "flex-start",
paddingHorizontal:"2%",
paddingVertical:"2%",
borderRadius: 20,
borderWidth: 3,
},

backText: {
fontSize: 16,
paddingLeft:"3%",

},
});
106 changes: 106 additions & 0 deletions src/screens/OtherInfoScreen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
import {
Pressable,
View,
SafeAreaView,
StyleSheet,
Text,
Image,
ImageBackground,
} from "react-native";
import NextButton from "../components/NextButton";
import BackButton from "../components/BackButton";
import { LinearGradient } from "expo-linear-gradient";
import CheckBoxQuery from "../components/CheckBoxQuery";
import UploadButton from "../components/UploadButton";
import TextField from "../components/TextField";

export default function OtherInfoScreen() {
return (
<SafeAreaView style={styles.container}>
<View style={styles.checkBoxesContainer}>
<View
style={{
paddingLeft: "4%",
paddingRight: "20%",
flex: 1,
justifyContent: "space-between",
paddingTop: "2%",
flexDirection: "column",
}}
>
<CheckBoxQuery
question={
"Do you give permission for Audacity Music Club to post recordings of your performance on public websites? "
}
/>
<CheckBoxQuery
question={
"My parent has given their consent for my participation. "
}
/>
</View>
</View>
<View style={styles.uploadsContainer}>
<View>
<Text style={{ paddingBottom: "3%" }}>
Our volunteer piano accompanist can provide sight reading
accompaniment for entry level players. To request this service,
upload the main score AND accompaniment score in one PDF file. (100
MB file size limit)
</Text>
<UploadButton />
</View>
<View style={{ paddingTop: "3%" }}>
<Text style={{ paddingBottom: "3%" }}>
Upload your Library Band Ensemble profile as one PDF file.
</Text>
<UploadButton />
</View>
</View>
<View style={styles.otherInfoContainer}>
<TextField
title={
"Other Information, such as special requests in sequence arrangement (optional) "
}
/>
</View>
<View style={styles.nextContainer}>
<Pressable style={[{ marginBottom: "5%", marginRight: "4%" }]}>
<NextButton />
</Pressable>
</View>
</SafeAreaView>
);
}

const styles = StyleSheet.create({
container: {
display: "flex",
flex: 1,
flexDirection: "column",
justifyContent: "space-between",
},

checkBoxesContainer: {
flex: 2.5,
},
uploadsContainer: {
flex: 3.5,
paddingLeft: "4%",
paddingRight: "20%",
marginTop: "3%",
justifyContent: "space-evenly",
},
otherInfoContainer: {
paddingTop: "3%",
flex: 1.2,
paddingLeft: "4%",
paddingRight: "10%",
backgroundColor: "re",
},
nextContainer: {
flex: 2.2,
justifyContent: "flex-end",
alignItems: "flex-end",
},
});

0 comments on commit fea2db8

Please sign in to comment.