From ab157d10ab0c342441ea171aa088bad3daf9858e Mon Sep 17 00:00:00 2001 From: Elsa2116 Date: Sun, 16 Mar 2025 09:03:57 -0400 Subject: [PATCH] done --- src/App.js | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 98 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 3784575..205b10d 100644 --- a/src/App.js +++ b/src/App.js @@ -15,7 +15,104 @@ function App() { target="_blank" rel="noopener noreferrer" > - Learn React + import React, { useState } from "react"; +import "bulma/css/bulma.min.css"; + +// Iteration 1: IdCard Component +const IdCard = ({ lastName, firstName, gender, height, birth, picture }) => ( +
+
+
+
+ {`${firstName} +
+
+
+

First Name: {firstName}

+

Last Name: {lastName}

+

Gender: {gender}

+

Height: {height}cm

+

Birth: {birth.toDateString()}

+
+
+
+); + +// Iteration 2: Greetings Component +const Greetings = ({ lang, children }) => { + const greetings = { + de: "Hallo", + en: "Hello", + es: "Hola", + fr: "Bonjour", + }; + return
{greetings[lang]} {children}
; +}; + +// Iteration 3: Random Component +const Random = ({ min, max }) => ( +
+ Random value between {min} and {max} => {Math.floor(Math.random() * (max - min + 1) + min)} +
+); + +// Iteration 4: BoxColor Component +const BoxColor = ({ r, g, b }) => { + const divStyle = { backgroundColor: `rgb(${r},${g},${b})`, padding: "20px", textAlign: "center" }; + return
rgb({r},{g},{b})
; +}; + +// Iteration 5: CreditCard Component +const CreditCard = ({ type, number, expirationMonth, expirationYear, bank, owner, bgColor, color }) => { + const cardStyle = { backgroundColor: bgColor, color: color, padding: "20px", borderRadius: "10px", width: "300px" }; + return ( +
+

{type}

+

**** **** **** {number.slice(-4)}

+

Expires {expirationMonth}/{expirationYear}

+

{bank}

+

{owner}

+
+ ); +}; + +// Iteration 8: LikeButton Component +const LikeButton = () => { + const [likes, setLikes] = useState(0); + return ; +}; + +// App Component +const App = () => ( +
+

React Training Lab

+ + François + + + + +
+); + +export default App; +