From c2c3821ce2b80e5dd85a41cf4bb0b9a563cf315d Mon Sep 17 00:00:00 2001 From: Filip Rojek Date: Sun, 5 May 2024 17:44:42 +0200 Subject: [PATCH] Working on login screen --- frontend/App.js | 12 +++--- frontend/components/Button.js | 33 ++++++++++++++++ frontend/components/TextInput.js | 0 frontend/components/style.js | 8 ++++ frontend/screens/Login.js | 66 ++++++++++++++++++++++++++++++++ 5 files changed, 112 insertions(+), 7 deletions(-) create mode 100644 frontend/components/Button.js create mode 100644 frontend/components/TextInput.js create mode 100644 frontend/components/style.js create mode 100644 frontend/screens/Login.js diff --git a/frontend/App.js b/frontend/App.js index 09f879b..cb9516c 100644 --- a/frontend/App.js +++ b/frontend/App.js @@ -1,11 +1,12 @@ -import { StatusBar } from 'expo-status-bar'; -import { StyleSheet, Text, View } from 'react-native'; +import { StatusBar } from "expo-status-bar"; +import { StyleSheet, Text, View } from "react-native"; +import { LoginForm } from "./screens/Login"; export default function App() { return ( - Open up App.js to start working on your app! - + + ); } @@ -13,8 +14,5 @@ export default function App() { const styles = StyleSheet.create({ container: { flex: 1, - backgroundColor: '#fff', - alignItems: 'center', - justifyContent: 'center', }, }); diff --git a/frontend/components/Button.js b/frontend/components/Button.js new file mode 100644 index 0000000..624dcc3 --- /dev/null +++ b/frontend/components/Button.js @@ -0,0 +1,33 @@ +import React from "react"; +import { Text, StyleSheet, Pressable } from "react-native"; + +export default function Button(props) { + const { onPress, title = "Save", color = "black" } = props; + return ( + + {title} + + ); +} + +const styles = StyleSheet.create({ + button: { + alignItems: "center", + justifyContent: "center", + paddingVertical: 12, + paddingHorizontal: 32, + borderRadius: 4, + elevation: 3, + backgroundColor: "black", + }, + text: { + fontSize: 16, + lineHeight: 21, + fontWeight: "bold", + letterSpacing: 0.25, + color: "white", + }, +}); diff --git a/frontend/components/TextInput.js b/frontend/components/TextInput.js new file mode 100644 index 0000000..e69de29 diff --git a/frontend/components/style.js b/frontend/components/style.js new file mode 100644 index 0000000..e47df1f --- /dev/null +++ b/frontend/components/style.js @@ -0,0 +1,8 @@ +export const colors = { + gold: "#FFD700ff", + brown: "#8B4513ff", + green: "#228B22ff", + charcoal: "#2C3E50ff", + black: "#020405ff", + dark: "#010611", +}; diff --git a/frontend/screens/Login.js b/frontend/screens/Login.js new file mode 100644 index 0000000..b6a3300 --- /dev/null +++ b/frontend/screens/Login.js @@ -0,0 +1,66 @@ +import { + StyleSheet, + TouchableOpacity, + TextInput, + View, + Text, +} from "react-native"; +import Button from "../components/Button"; +import { colors } from "../components/style"; + +export function LoginForm() { + return ( + + Please Log In + + + +