diff --git a/src/App.jsx b/src/App.jsx
index 98d0f49..40eb91f 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -1,9 +1,42 @@
-import "./App.css";
+import IdCard from "./components/IdCard";
+import Greetings from "./components/Greetings";
+import Random from "./components/Random";
+import BoxColor from "./components/BoxColor";
function App() {
return (
-
LAB | React Training
+ Id Cards
+
+
+
+
+
+ Greetings
+ Ludwig
+ François
+
+ Random Numbers
+
+
+
+ Box Colors
+
+
);
}
diff --git a/src/components/BoxColor.jsx b/src/components/BoxColor.jsx
new file mode 100644
index 0000000..267b823
--- /dev/null
+++ b/src/components/BoxColor.jsx
@@ -0,0 +1,23 @@
+function BoxColor({ r, g, b }) {
+ const backgroundColor = `rgb(${r}, ${g}, ${b})`;
+ const hex = `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`;
+
+ return (
+
+
rgb({r}, {g}, {b})
{hex}
+
+ );
+}
+
+export default BoxColor;
\ No newline at end of file
diff --git a/src/components/Greetings.jsx b/src/components/Greetings.jsx
new file mode 100644
index 0000000..5000a4f
--- /dev/null
+++ b/src/components/Greetings.jsx
@@ -0,0 +1,27 @@
+function Greetings({ lang, children }) {
+ let greeting;
+ switch (lang) {
+ case 'de':
+ greeting = 'Hallo';
+ break;
+ case 'en':
+ greeting = 'Hello';
+ break;
+ case 'es':
+ greeting = 'Hola';
+ break;
+ case 'fr':
+ greeting = 'Bonjour';
+ break;
+ default:
+ greeting = 'Hello';
+ }
+
+ return (
+
+
{greeting} {children}
+
+ );
+}
+
+export default Greetings;
\ No newline at end of file
diff --git a/src/components/IdCard.jsx b/src/components/IdCard.jsx
new file mode 100644
index 0000000..f226e24
--- /dev/null
+++ b/src/components/IdCard.jsx
@@ -0,0 +1,20 @@
+function IdCard({ lastName, firstName, gender, height, birth, picture }) {
+ return (
+
+

+
+
First name: {firstName}
+
Last name: {lastName}
+
Gender: {gender}
+
Height: {height}cm
+
Birth: {birth.toDateString()}
+
+
+ );
+}
+
+export default IdCard;
diff --git a/src/components/Random.jsx b/src/components/Random.jsx
new file mode 100644
index 0000000..1089bb6
--- /dev/null
+++ b/src/components/Random.jsx
@@ -0,0 +1,11 @@
+function Random({ min, max }) {
+ const randomNumber = Math.floor(Math.random() * (max - min + 1)) + min;
+
+ return (
+
+
Random value between {min} and {max} => {randomNumber}
+
+ );
+}
+
+export default Random;
\ No newline at end of file
diff --git a/src/main.jsx b/src/main.jsx
index 4046932..3f46ac6 100644
--- a/src/main.jsx
+++ b/src/main.jsx
@@ -2,7 +2,6 @@ import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';
-
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(