From efe9928752490d5ccaf67eccf93f1407133838e8 Mon Sep 17 00:00:00 2001 From: Anthony RICHARD Date: Wed, 15 Jan 2025 15:26:28 +0100 Subject: [PATCH] add text and button --- app/(auth)/_layout.tsx | 4 +- app/(auth)/login.tsx | 42 ++++++++--- app/_layout.tsx | 2 + components/BackButton.tsx | 2 +- components/ExerciceOverview.tsx | 2 +- components/Screen.tsx | 8 --- components/form/LoginForm.tsx | 120 +++++++++++++++----------------- components/form/SigninForm.tsx | 2 +- components/ui/Button.tsx | 17 +++++ components/ui/Screen.tsx | 13 ++++ components/ui/Text.tsx | 27 +++++++ generate-react-cli.json | 4 +- tailwind.config.js | 2 +- 13 files changed, 158 insertions(+), 87 deletions(-) delete mode 100644 components/Screen.tsx create mode 100644 components/ui/Button.tsx create mode 100644 components/ui/Screen.tsx create mode 100644 components/ui/Text.tsx diff --git a/app/(auth)/_layout.tsx b/app/(auth)/_layout.tsx index df9c4da..0a21bab 100644 --- a/app/(auth)/_layout.tsx +++ b/app/(auth)/_layout.tsx @@ -2,10 +2,10 @@ import { Stack } from "expo-router"; export default function AuthLayout() { return ( - + + - ); diff --git a/app/(auth)/login.tsx b/app/(auth)/login.tsx index 39fc3c6..33c338a 100644 --- a/app/(auth)/login.tsx +++ b/app/(auth)/login.tsx @@ -1,6 +1,7 @@ -import Screen from "@/components/Screen"; -import {SafeAreaView, Text} from "react-native"; -import React from "react"; +import Screen from "@/components/ui/Screen"; +import CustomText from "@/components/ui/Text"; +import { Link } from "expo-router"; +import { View } from "react-native"; const socialNetworkButtons: ISocialNetworkButtons[] = [ { icon: "instagram" }, @@ -14,11 +15,36 @@ interface ISocialNetworkButtons { export default function LoginPage() { return ( - - - Tmp - - + + + + + Connexion à Optifit + + + Personnalise ton expérience du sport avec Optifit, ton nouveau coach + IA. + + + {/* */} + + + Tu n'as pas encore de compte ? + + + {" "} + Inscris-toi ! + + + + + + Mot de passe oublié ? + + + + + // // diff --git a/app/_layout.tsx b/app/_layout.tsx index 1c3ec19..887d66a 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -6,6 +6,8 @@ import { SessionProvider } from "@/ctx"; import {Slot, Stack} from "expo-router"; import "@/global.css"; +import "@/global.css"; + // Prevent the splash screen from auto-hiding before asset loading is complete. SplashScreen.preventAutoHideAsync(); diff --git a/components/BackButton.tsx b/components/BackButton.tsx index 1fdbd3b..df396be 100644 --- a/components/BackButton.tsx +++ b/components/BackButton.tsx @@ -1,5 +1,5 @@ import { AntDesign } from "@expo/vector-icons"; -import { Button, ButtonActions } from "./ui/button"; +import { Button, ButtonActions } from "./ui/Button"; import { Href, Link } from "expo-router"; type props = { diff --git a/components/ExerciceOverview.tsx b/components/ExerciceOverview.tsx index 5714d17..9288e46 100644 --- a/components/ExerciceOverview.tsx +++ b/components/ExerciceOverview.tsx @@ -3,7 +3,7 @@ import { Text } from "./ui/text"; import { Box } from "./ui/box"; import { ImageBackground } from "react-native"; import { HStack } from "@/components/ui/hstack"; -import { Button } from "@/components/ui/button"; +import { Button } from "@/components/ui/Button"; import { AntDesign } from "@expo/vector-icons"; export default function ExerciceOverview() { diff --git a/components/Screen.tsx b/components/Screen.tsx deleted file mode 100644 index 23919f9..0000000 --- a/components/Screen.tsx +++ /dev/null @@ -1,8 +0,0 @@ -import { PropsWithChildren } from "react"; -import { View } from "react-native"; - -type props = PropsWithChildren; - -export default function Screen({ children }: props) { - return {children}; -} diff --git a/components/form/LoginForm.tsx b/components/form/LoginForm.tsx index a58f45c..0406cfb 100644 --- a/components/form/LoginForm.tsx +++ b/components/form/LoginForm.tsx @@ -1,8 +1,6 @@ import React from "react"; -import { Button, ButtonIcon, ButtonText } from "../ui/button"; -import { ArrowRightIcon } from "../ui/icon"; -import { Link } from "expo-router"; -import {Text} from "react-native"; +import { Text } from "react-native"; +import Button from "../ui/Button"; export default function LoginForm() { const REQUIRED_ERROR = "Au moins un des champs requis est vide !"; const [emailValue, setEmailValue] = React.useState(""); @@ -18,64 +16,60 @@ export default function LoginForm() { }; return ( - // - // - // - // Adresse mail - // - // - // - // - // - // - // - // - // Mot de passe - // - // - // - // - // - // - // - // - // - // - // - // Adresse mail - // - // - // - // - // - // - // - // - // Mot de passe - // - // - // - // - // - // - // - // - // - // - // - sdf + + + + Adresse mail + + + + + + + + + Mot de passe + + + + + + + + + + + + Adresse mail + + + + + + + + + Mot de passe + + + + + + + + + +