Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a little styling for the text input boxes #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,5 @@ dist
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

.DS_Store
7 changes: 4 additions & 3 deletions packages/ReverseFood/app/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from "react-native";
import { useState } from "react";
import * as SecureStore from "expo-secure-store";
import { our_styles } from "../styles/styles";

export default function Login() {
const [username, setUsername] = useState("");
Expand Down Expand Up @@ -47,7 +48,7 @@ const url="https://mealathon.azurewebsites.net";
<View>
<Text style={styles.text}>Login</Text>
<View>
<TextInput style={styles.textinput}
<TextInput style={our_styles.textInput}
placeholder="Username"
value={username}
onChangeText={(text) => setUsername(text)}
Expand All @@ -56,7 +57,7 @@ const url="https://mealathon.azurewebsites.net";
></TextInput>
</View>
<View>
<TextInput style={styles.textinput}
<TextInput style={our_styles.textInput}
placeholder="Password"
secureTextEntry
value={password}
Expand Down Expand Up @@ -88,4 +89,4 @@ const styles = StyleSheet.create({
padding: 5,
textAlign: "center",
},
});
});
5 changes: 3 additions & 2 deletions packages/ReverseFood/app/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
} from "react-native";
import { useState } from "react";
import * as SecureStore from "expo-secure-store";
import { our_styles } from "../styles/styles";

export default function Login() {
const [username, setUsername] = useState("");
Expand Down Expand Up @@ -52,7 +53,7 @@ export default function Login() {
<View>
<Text style={styles.text}>Sign Up</Text>
<View>
<TextInput style={styles.textinput}
<TextInput style={our_styles.textInput}
placeholder="Username"
value={username}
onChangeText={(text) => setUsername(text)}
Expand All @@ -61,7 +62,7 @@ export default function Login() {
></TextInput>
</View>
<View>
<TextInput style={styles.textinput}
<TextInput style={our_styles.textInput}
placeholder="Password"
secureTextEntry
value={password}
Expand Down
10 changes: 9 additions & 1 deletion packages/ReverseFood/components/FoodInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useState } from "react";
import * as ImagePicker from "expo-image-picker";
import ImgToBase64 from "react-native-image-base64";
import { submitData } from "../components/submitData";
import { colors, ourStyles } from "../styles/styles.jsx";
import { colors, our_styles } from "../styles/styles.jsx";
import { router } from "expo-router";


Expand Down Expand Up @@ -56,6 +56,7 @@ export default function FoodInput() {
placeholder="Name"
onChangeText={(text) => setFoodName(text)}
value={foodName}
style={our_styles.textInput}
></TextInput>
</View>
<View>
Expand All @@ -71,6 +72,9 @@ export default function FoodInput() {
placeholder="Ingredients"
onChangeText={(text) => setIngredients(text)}
value={ingredients}
style={[our_styles.textInput, our_styles.textArea]}
multiline={true}
numberOfLines={4}
></TextInput>
</View>
<View>
Expand All @@ -79,6 +83,10 @@ export default function FoodInput() {
placeholder="Description"
onChangeText={(text) => setDescription(text)}
value={desc}
style={[our_styles.textInput, our_styles.textArea]}
multiline={true}
numberOfLines={4}

></TextInput>
</View>
<Button title="Submit" onPress={()=> swutchPages(image,foodName,ingredients,desc)}/>
Expand Down
Loading