diff --git a/LeftOvers/App.js b/LeftOvers/App.js index 69cb932..2cb99a4 100644 --- a/LeftOvers/App.js +++ b/LeftOvers/App.js @@ -2,23 +2,14 @@ import { StatusBar } from 'expo-status-bar'; import React from 'react'; import { StyleSheet, Text, View, Alert } from 'react-native'; import CustomButton from './components/CustomButton'; +import FoodElementText from './components/FoodElementText'; export default function App() { - const handleButtonPress = () => { - console.log("test 1"); - }; - - const handleButtonPress2 = () => { - console.log("test 2"); - }; - return ( - Ceci va etre la page qui charge le splashScreen - - - + + ); } diff --git a/LeftOvers/assets/images/minus.png b/LeftOvers/assets/images/minus.png new file mode 100644 index 0000000..1e5886d Binary files /dev/null and b/LeftOvers/assets/images/minus.png differ diff --git a/LeftOvers/assets/images/plus.png b/LeftOvers/assets/images/plus.png new file mode 100644 index 0000000..1b3d0f2 Binary files /dev/null and b/LeftOvers/assets/images/plus.png differ diff --git a/LeftOvers/components/FoodElementText.tsx b/LeftOvers/components/FoodElementText.tsx new file mode 100644 index 0000000..5f3cf9e --- /dev/null +++ b/LeftOvers/components/FoodElementText.tsx @@ -0,0 +1,58 @@ +import React from 'react'; +import {StyleSheet,Pressable, Text, View, Image} from 'react-native'; +import Separator from '../components/Separator'; +import plus from '../assets/images/plus.png'; +import moins from '../assets/images/minus.png'; + +export default function FoodElementText(props) { + return ( + + + + {props.title} + + + + + + + ); +} + +const styles = StyleSheet.create({ + button: { + alignItems: 'center', + justifyContent: 'center', + width : 350, + height: 60, + borderRadius: 5, + elevation: 3, + backgroundColor: '#ACA279', + }, + text: { + fontSize: 15, + lineHeight: 21, + fontWeight: 'bold', + letterSpacing: 0.25, + padding : 7, + color: 'black', + }, + view: { + + alignItems: 'flex-start', + justifyContent: 'center', + marginRight: 5 // Centre le contenu horizontalement + }, + container: { + width : 340, + height: 50, + borderRadius: 5, + elevation: 3, + borderWidth: 2, + borderColor: 'black', + flexDirection: 'row', + justifyContent: 'space-between', + }, +}); + + diff --git a/LeftOvers/components/Separator.tsx b/LeftOvers/components/Separator.tsx new file mode 100644 index 0000000..12562c2 --- /dev/null +++ b/LeftOvers/components/Separator.tsx @@ -0,0 +1,17 @@ +import React from 'react'; +import {StyleSheet, View} from 'react-native'; + +export default function Separator (){ + return ; +}; + + const styles = StyleSheet.create({ + separator: { + width: 250, // Largeur de la ligne + backgroundColor: 'black', // Couleur de la ligne + borderWidth : 1, + marginLeft : 10, + marginRight : 10, + }, + }); + \ No newline at end of file