From 52fbfbb16be0096367a457d08a45cde18931e523 Mon Sep 17 00:00:00 2001 From: GabrielMoraeswolf <58598993+GabrielMoraeswolf@users.noreply.github.com> Date: Wed, 24 May 2023 16:01:32 -0300 Subject: [PATCH 1/2] init --- Screens/CartScreen/Index.tsx | 26 +++++++++++++++++++++----- Screens/CartScreen/Styles.ts | 32 ++++++++++++++++++++++++++++---- Screens/ProductScreen/Index.tsx | 1 - 3 files changed, 49 insertions(+), 10 deletions(-) diff --git a/Screens/CartScreen/Index.tsx b/Screens/CartScreen/Index.tsx index 7764aeb..fa79106 100644 --- a/Screens/CartScreen/Index.tsx +++ b/Screens/CartScreen/Index.tsx @@ -1,14 +1,30 @@ -import { ScrollView, View, Text } from "react-native"; +import { ScrollView, View, Text, Image } from "react-native"; import styles from "./Styles"; +import { PriceCard } from "../../Components/PriceCard/PriceCard"; +import FavoriteButton from "../../Components/FavoriteButton/FavoriteButton"; + +const ProductScreen = ({ route }: { route: any }) => { + const { title, price, image } = route.params; + return ( + + + {title} + + + + + + + + + ); + }; function CartScreen() { return( - TOTAL - - R$ - + ); diff --git a/Screens/CartScreen/Styles.ts b/Screens/CartScreen/Styles.ts index a1bda98..29e93cd 100644 --- a/Screens/CartScreen/Styles.ts +++ b/Screens/CartScreen/Styles.ts @@ -2,10 +2,34 @@ import { StyleSheet } from "react-native"; import { Colors } from "../../styles"; const styles = StyleSheet.create({ - container:{ - flex:1, - backgroundColor: Colors.background, - }, + container: { + flex: 1, + marginTop: 55, + marginLeft: 15, + marginRight: 15 + }, + card: { + backgroundColor: Colors.input, + borderRadius: 10, + padding: 10, + }, + productTitle: { + fontSize: 18, + color: Colors.white, + fontWeight: "bold", + marginBottom: 10, + marginRight: 10 + }, + cardImage: { + width: "90%", + justifyContent: 'center', + height: 250, + marginBottom: 10, + }, + priceAndFavoriteContainer: { + flexDirection: "row", + justifyContent: "space-between", + }, }) export default styles; \ No newline at end of file diff --git a/Screens/ProductScreen/Index.tsx b/Screens/ProductScreen/Index.tsx index 4201bda..ebfc3b5 100644 --- a/Screens/ProductScreen/Index.tsx +++ b/Screens/ProductScreen/Index.tsx @@ -14,7 +14,6 @@ const ProductScreen = ({ route }: { route: any }) => { - From e89480c1f2f6c20a0986c9a11a1756dc0eace129 Mon Sep 17 00:00:00 2001 From: GabrielMoraeswolf <58598993+GabrielMoraeswolf@users.noreply.github.com> Date: Thu, 25 May 2023 09:42:03 -0300 Subject: [PATCH 2/2] CartSreen test --- Screens/CartScreen/Index.tsx | 39 +++++++++++++++--------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/Screens/CartScreen/Index.tsx b/Screens/CartScreen/Index.tsx index fa79106..34f055c 100644 --- a/Screens/CartScreen/Index.tsx +++ b/Screens/CartScreen/Index.tsx @@ -1,32 +1,25 @@ -import { ScrollView, View, Text, Image } from "react-native"; +import { ScrollView, View, Text, Image,Button } from "react-native"; import styles from "./Styles"; +import ProductScreen from "../ProductScreen/Index" import { PriceCard } from "../../Components/PriceCard/PriceCard"; -import FavoriteButton from "../../Components/FavoriteButton/FavoriteButton"; -const ProductScreen = ({ route }: { route: any }) => { + +const CartScreen = ({ route }: { route: any }) => { const { title, price, image } = route.params; - return ( - - - {title} - - - - - - + + return( + + + + {title} + + + + - ); - }; - -function CartScreen() { - return( - - - - - + + ); }