From 054dde7138a73f8c4bb2f420cdec460cfb742937 Mon Sep 17 00:00:00 2001 From: natekhchan Date: Mon, 26 Aug 2024 12:00:45 -0700 Subject: [PATCH] done --- .../images => public/img}/dice-empty.png | Bin {src/assets/images => public/img}/dice1.png | Bin {src/assets/images => public/img}/dice2.png | Bin {src/assets/images => public/img}/dice3.png | Bin {src/assets/images => public/img}/dice4.png | Bin {src/assets/images => public/img}/dice5.png | Bin {src/assets/images => public/img}/dice6.png | Bin public/img/mastercard.png | Bin 0 -> 11305 bytes public/img/visa.png | Bin 0 -> 6242 bytes src/App.css | 15 ++ src/App.js | 160 +++++++++++++++--- src/components/BoxColor.css | 20 +++ src/components/BoxColor.js | 36 ++++ src/components/Carousel.css | 26 +++ src/components/Carousel.js | 23 +++ src/components/ClickablePicture.js | 20 +++ src/components/CreditCard.css | 44 +++++ src/components/CreditCard.js | 47 +++++ src/components/Dice.js | 28 +++ src/components/DriverCard.css | 40 +++++ src/components/DriverCard.js | 18 ++ src/components/Greetings.css | 7 + src/components/Greetings.js | 25 +++ src/components/IdCard.css | 24 +++ src/components/IdCard.js | 24 +++ src/components/LikeButton.css | 13 ++ src/components/LikeButton.js | 26 +++ src/components/NumbersTable.css | 25 +++ src/components/NumbersTable.js | 21 +++ src/components/RGBColorPicker.js | 73 ++++++++ src/components/Random.css | 8 + src/components/Random.js | 18 ++ src/components/Rating.css | 5 + src/components/Rating.js | 18 ++ src/components/SingleColorPicker.js | 46 +++++ 35 files changed, 787 insertions(+), 23 deletions(-) rename {src/assets/images => public/img}/dice-empty.png (100%) rename {src/assets/images => public/img}/dice1.png (100%) rename {src/assets/images => public/img}/dice2.png (100%) rename {src/assets/images => public/img}/dice3.png (100%) rename {src/assets/images => public/img}/dice4.png (100%) rename {src/assets/images => public/img}/dice5.png (100%) rename {src/assets/images => public/img}/dice6.png (100%) create mode 100644 public/img/mastercard.png create mode 100644 public/img/visa.png create mode 100644 src/components/BoxColor.css create mode 100644 src/components/BoxColor.js create mode 100644 src/components/Carousel.css create mode 100644 src/components/Carousel.js create mode 100644 src/components/ClickablePicture.js create mode 100644 src/components/CreditCard.css create mode 100644 src/components/CreditCard.js create mode 100644 src/components/Dice.js create mode 100644 src/components/DriverCard.css create mode 100644 src/components/DriverCard.js create mode 100644 src/components/Greetings.css create mode 100644 src/components/Greetings.js create mode 100644 src/components/IdCard.css create mode 100644 src/components/IdCard.js create mode 100644 src/components/LikeButton.css create mode 100644 src/components/LikeButton.js create mode 100644 src/components/NumbersTable.css create mode 100644 src/components/NumbersTable.js create mode 100644 src/components/RGBColorPicker.js create mode 100644 src/components/Random.css create mode 100644 src/components/Random.js create mode 100644 src/components/Rating.css create mode 100644 src/components/Rating.js create mode 100644 src/components/SingleColorPicker.js diff --git a/src/assets/images/dice-empty.png b/public/img/dice-empty.png similarity index 100% rename from src/assets/images/dice-empty.png rename to public/img/dice-empty.png diff --git a/src/assets/images/dice1.png b/public/img/dice1.png similarity index 100% rename from src/assets/images/dice1.png rename to public/img/dice1.png diff --git a/src/assets/images/dice2.png b/public/img/dice2.png similarity index 100% rename from src/assets/images/dice2.png rename to public/img/dice2.png diff --git a/src/assets/images/dice3.png b/public/img/dice3.png similarity index 100% rename from src/assets/images/dice3.png rename to public/img/dice3.png diff --git a/src/assets/images/dice4.png b/public/img/dice4.png similarity index 100% rename from src/assets/images/dice4.png rename to public/img/dice4.png diff --git a/src/assets/images/dice5.png b/public/img/dice5.png similarity index 100% rename from src/assets/images/dice5.png rename to public/img/dice5.png diff --git a/src/assets/images/dice6.png b/public/img/dice6.png similarity index 100% rename from src/assets/images/dice6.png rename to public/img/dice6.png diff --git a/public/img/mastercard.png b/public/img/mastercard.png new file mode 100644 index 0000000000000000000000000000000000000000..8f5ddb040a31e9b745a139aa2bf8310efef4a43a GIT binary patch literal 11305 zcmdsd^;=Y5^e!cx(w&OZol*jVL3a&Z!q6c@3KD{%sC0vLcY_kr+HSO+V6VT+VfUlSBrv_g%k$|hvKQWh9M3Pt{e78ObFb8 zY}?N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dJ96enKva3NsbMl`E{%H5Bk$OW#(v)v!`Y{~Q?hC4D^PS&_=den=*WjJ!(B@A0izW9GDah4C|>6z$s& z%Ic`z1=6;njEt$H*&_>jXDS6ZP+w)h*qto52(7%*^c?g4*A@!77*M)xRN-a-9 zMaO51Y@x)Cuv%<`VEJI$UKxEyFR#oWXrCku@6$E><;mB34lEs_+Bn!S==J++p0sad61hpC`2FLH zSpTGTSlGX%*s(N-#K>w$q<;7QTvs=}4gZcM+7?u=!h0#lCHQ_H^)gs3FHe~tDM~oz z_EaMUhd;E?HQstUTguV|Uw^sb#%|!)0?ogllhk9_SNE^$vyziSC`XOukO5gA(l?bR zHX&g3flzGrY>qe!4DH4;+ac?VRDaj$`6_+okl$~Bdh~M*0x|8>HEZssw3js`?U*SW zPN*WgvWmVAIAq)m;7ouzO|3zYX;L+%3Y^KUl5? zJ8@+mw&ol*uO9IjAv^Xpidaj-<;fQUp}Kf3Hf<%rqTywZmu>lHXAi_$sI2r#S$5?4 zBm$?nVah_kk6uy1%>&fIR^hjF@#pUVXP$!l!B3kgoA!lTf_sm7}OMHT%>FYFfB=&-s4B2CQ+9s@;?ByyF1=0W?-3Dq(u zEr#FJaJ9v<)No6jU6fsc*2Uy{@^y=){p>G$>91Rx$95r=d1nBroX$}Wgj)dZG4irS y>KUAm{2(n~;7DztDW8asGlu*B$zM(}kz})ofw^kx6X3tUI8QZoHEJK*MgK3ykr1r_ literal 0 HcmV?d00001 diff --git a/public/img/visa.png b/public/img/visa.png new file mode 100644 index 0000000000000000000000000000000000000000..3bac7e329c3f5141ca6af299353c6fa72bc4bf56 GIT binary patch literal 6242 zcmeHM_g7Qfwnl*?9Th~RiXJJU2}lbFSDI1{C6v&OfV2=w3?QI%m7=JCkOV{yHG~#= zXrh1+0R@vtFA*bzBE6Fr-hJ<{xc7%O_84pLIriFX&iR$KpMk7y^KyxBv9Pf4n%*(8 zVPQGtaxysnV$LK8{iVRXaKi66g|e`43!IEoEV*c578YSaQ=?mU;ppYb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mx)`Xl<6kj%U8%5Htf-P*`+{cbV|(Vf7ZHq!6uDKV+9fJ}@qR|Aj;Tp_cs7>n-^ zn}c|Zr0x5zW}oB29_I`rClD)h#lH-9=fd^&^PM5id4yfyd|eoA079{W7bb?vN;+ofLjeD|9qZ8sneG~J? z00Q^yaN~kWj=whhF*qKk^--q0?P3=rAW()lz%=73G9`+4!WX-fW&3$5lXOOqU4*EIiE13+p z&G{wjKbfFP;z+avvKjZjE&m3Xl@{U3GCEVWw)AaA;Btco{OIC^11&TWy6wzSb6fT& zlQhzqEg^5FTx0H`JwDdCbzXM=c95K7veQ#_LG*Y#pPFO?w)M0t$*DmxE#WJr$Nmg# z>9w~rgi9(;wZ2itG1s#A@xwc~^9_UAG9p|;Z5beMgt+q;t?}H~;Tdd;P2ZB^$|P=S zHp|+$#Cz{xW_2I!O7-Bzq+DGLb$x!^IbU*J!tmLF_<4oAE8t zIl0@`R4dQ8L9dVnt?~U%uz3ak%d^E8QEk0e(j(?^5M##bz=`Sc2Bk*=x+sz*#$O}L zUzzvg#$CM8fy)psuQ|kpR}l(C-zE}Mn=n1ovbbc+)O&~V-F)-eU)C+ZZ_iT>9VhOC z>C#O`I>eLCuFm|(;j(j7f1*+gf4Bo)cpX;;PT26o6bvR;g{I_6+c)mS+{Gj_y!+SX-SW_V->-VDtvlaTN1Eb6gCHl3EEmE{G5d9*Co*QKuXG^ z+KeIY)Trcl01sLqJ%W%rPdhiaBLlCw(68vpnEurjUbZgF?ao&lDR6x;?c^BNM2_VN xM=UqX6*eW7r)Qg3E*s38{_n(p+OFdRT_B2{SP>Xd+Y!J literal 0 HcmV?d00001 diff --git a/src/App.css b/src/App.css index 74b5e05..5edb228 100644 --- a/src/App.css +++ b/src/App.css @@ -36,3 +36,18 @@ transform: rotate(360deg); } } + +.credit-card-container { + display: flex; + justify-content: center; /* Center the cards horizontally */ + gap: 20px; /* Optional: Add space between the cards */ + margin-top: 20px; /* Optional: Add some space above the card container */ +} + +.driver-cards { + text-align: center; +} + +.rgb-color-picker-container { + text-align: center; +} \ No newline at end of file diff --git a/src/App.js b/src/App.js index 3784575..8bf6afe 100644 --- a/src/App.js +++ b/src/App.js @@ -1,25 +1,139 @@ -import logo from './logo.svg'; -import './App.css'; + import './App.css'; + import IdCard from './components/IdCard'; + import Greetings from './components/Greetings'; + import Random from './components/Random'; + import BoxColor from './components/BoxColor'; + import CreditCard from './components/CreditCard'; + import Rating from './components/Rating'; + import DriverCard from './components/DriverCard'; + import LikeButton from './components/LikeButton'; + import ClickablePicture from './components/ClickablePicture'; + import maxence from './assets/images/maxence.png'; + import maxenceGlasses from './assets/images/maxence-glasses.png'; + import Dice from './components/Dice'; + import Carousel from './components/Carousel'; + import NumbersTable from './components/NumbersTable'; + import RGBColorPicker from './components/RGBColorPicker'; // Import the RGBColorPicker -function App() { - return ( -
-
- logo -

- Edit src/App.js and save to reload. -

- - Learn React - -
-
- ); -} -export default App; + function App() { + return ( +
+
+ + +
+
+ Ludwig + François + + + + +
+
+ + + +
+
+ 0 + 1.49 + 1.5 + 3 + 4 + 5 +
+
+ + + +
+
+ + +
+
+ +
+
+ +
+
+ +
+ +
+
+ +
+
+
+ ); + } + + export default App; diff --git a/src/components/BoxColor.css b/src/components/BoxColor.css new file mode 100644 index 0000000..3aa3494 --- /dev/null +++ b/src/components/BoxColor.css @@ -0,0 +1,20 @@ +.box-color { + width: 80%; /* Adjust width as needed */ + height: 150px; /* Adjust height as needed */ + display: flex; + align-items: center; + flex-direction: column; /* Stack text vertically */ + justify-content: center; + color: white; + font-family: Arial, sans-serif; + border: 2px solid black; /* Optional: border to define the box */ + margin-bottom: 20px; + margin-left: 10px; + } + + .box-color p { + margin: 0; + font-size: 30px; + /* Optional: adjust spacing between lines */ + line-height: 1.5; + } \ No newline at end of file diff --git a/src/components/BoxColor.js b/src/components/BoxColor.js new file mode 100644 index 0000000..b14b379 --- /dev/null +++ b/src/components/BoxColor.js @@ -0,0 +1,36 @@ +import React from 'react'; +import './BoxColor.css'; + +// Function to convert RGB to Hex +const rgbToHex = (r, g, b) => { + const toHex = (num) => { + const hex = num.toString(16); + return hex.length === 1 ? '0' + hex : hex; + }; + return `#${toHex(r)}${toHex(g)}${toHex(b)}`.toLowerCase(); + }; + +const BoxColor = ({ r, g, b }) => { + // Ensure the values are within the valid range + const clampedR = Math.max(0, Math.min(255, r)); + const clampedG = Math.max(0, Math.min(255, g)); + const clampedB = Math.max(0, Math.min(255, b)); + + // Create the RGB color string + const rgbColor = `rgb(${clampedR}, ${clampedG}, ${clampedB})`; + + // Create the Hex color string + const hexColor = rgbToHex(clampedR, clampedG, clampedB); + + // Determine text color based on the RGB value + const textColor = (clampedR === 128 && clampedG === 255 && clampedB === 0) ? 'black' : 'white'; + + return ( +
+

{rgbColor}

+

{hexColor}

+
+ ); +}; + +export default BoxColor; \ No newline at end of file diff --git a/src/components/Carousel.css b/src/components/Carousel.css new file mode 100644 index 0000000..6dd70ec --- /dev/null +++ b/src/components/Carousel.css @@ -0,0 +1,26 @@ +.carousel { + display: flex; + align-items: center; + justify-content: center; + position: relative; + } + + .carousel-image { + width: 300px; + height: 200px; + object-fit: cover; + margin: 0 10px; + } + + .carousel-button { + background-color: #007bff; + color: white; + border: none; + padding: 10px; + cursor: pointer; + } + + .carousel-button:hover { + background-color: #0056b3; + } + \ No newline at end of file diff --git a/src/components/Carousel.js b/src/components/Carousel.js new file mode 100644 index 0000000..bae1914 --- /dev/null +++ b/src/components/Carousel.js @@ -0,0 +1,23 @@ +import React, { useState } from 'react'; + +const Carousel = ({ images }) => { + const [currentIndex, setCurrentIndex] = useState(0); + + const goToPrevious = () => { + setCurrentIndex((prevIndex) => (prevIndex - 1 + images.length) % images.length); + }; + + const goToNext = () => { + setCurrentIndex((prevIndex) => (prevIndex + 1) % images.length); + }; + + return ( +
+ + carousel + +
+ ); +}; + +export default Carousel; \ No newline at end of file diff --git a/src/components/ClickablePicture.js b/src/components/ClickablePicture.js new file mode 100644 index 0000000..310eb38 --- /dev/null +++ b/src/components/ClickablePicture.js @@ -0,0 +1,20 @@ +import React, { useState } from 'react'; + +const ClickablePicture = ({ img, imgClicked }) => { + const [isClicked, setIsClicked] = useState(false); + + const handleClick = () => { + setIsClicked(!isClicked); + }; + + return ( + Clickable + ); +}; + +export default ClickablePicture; diff --git a/src/components/CreditCard.css b/src/components/CreditCard.css new file mode 100644 index 0000000..5467358 --- /dev/null +++ b/src/components/CreditCard.css @@ -0,0 +1,44 @@ +.credit-card { + width: 300px; + height: 130px; + border-radius: 10px; + padding: 20px; + display: flex; + flex-direction: column; + justify-content: space-between; + font-family: Arial, sans-serif; + margin: 20px; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); +} + +.card-logo { + display: flex; + justify-content: flex-end; +} + +.card-logo img { + margin-top: -15px; + width: 50px; + height: auto; +} + +.card-number { + font-size: 30px; + letter-spacing: 2px; + margin-top: -28px; +} + +.card-info { + font-size: 14px; + text-align: left; +} + +.bank { + margin-left: 30px; +} + +.owner { + display: flex; + margin-top: 20px; /* Optional: Adjust the spacing above the owner text */ + font-size: 14px; +} \ No newline at end of file diff --git a/src/components/CreditCard.js b/src/components/CreditCard.js new file mode 100644 index 0000000..7042f09 --- /dev/null +++ b/src/components/CreditCard.js @@ -0,0 +1,47 @@ +import React from 'react'; +import './CreditCard.css'; + +const CreditCard = ({ + type, + number, + expirationMonth, + expirationYear, + bank, + owner, + bgColor, + color, +}) => { + // Format the credit card number to show only the last 4 digits + const lastFourDigits = number.slice(-4); + + // Format the expiration month to always be two digits (e.g., '03' for March) + const formattedMonth = expirationMonth.toString().padStart(2, '0'); + + // Determine the credit card type logo + const cardLogo = type === 'Visa' ? '/img/visa.png' : '/img/mastercard.png'; + + return ( +
+
+ {`${type} +
+
+

•••• •••• •••• {lastFourDigits}

+
+
+ + Expires {formattedMonth}/{expirationYear} + + + {bank} + + +
+ {owner} +
+
+
+ ); +}; + +export default CreditCard; diff --git a/src/components/Dice.js b/src/components/Dice.js new file mode 100644 index 0000000..1b5f604 --- /dev/null +++ b/src/components/Dice.js @@ -0,0 +1,28 @@ +import React, { useState } from 'react'; + +const Dice = () => { + // State to keep track of the current dice image + const [diceImage, setDiceImage] = useState('/img/dice3.png'); + + const rollDice = () => { + // Set the dice to the empty image + setDiceImage('/img/dice-empty.png'); + + // After 1 second, change the image to a random dice image + setTimeout(() => { + const randomDiceValue = Math.floor(Math.random() * 6) + 1; + setDiceImage(`/img/dice${randomDiceValue}.png`); + }, 1000); + }; + + return ( + dice + ); +}; + +export default Dice; diff --git a/src/components/DriverCard.css b/src/components/DriverCard.css new file mode 100644 index 0000000..9024aa1 --- /dev/null +++ b/src/components/DriverCard.css @@ -0,0 +1,40 @@ +.driver-card { + display: flex; + align-items: center; + justify-content: flex-start; /* Keeps items in their natural flow */ + background-color: #455eb5; + color: white; + border-radius: 10px; + padding: 20px; + width: 700px; + margin: 20px auto; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + padding-left: 400px; + } + + .driver-img { + width: 100px; + height: 100px; + border-radius: 50%; + object-fit: cover; + margin-right: 20px; + } + + .driver-info { + flex-grow: 1; + display: flex; + flex-direction: column; + justify-content: center; /* Vertically centers the text within the info section */ + } + + .driver-info h2 { + margin: 0; + font-size: 24px; + text-align: left; + } + + .driver-info p { + margin: -5px 0 0; + font-size: 16px; + text-align: left; + } \ No newline at end of file diff --git a/src/components/DriverCard.js b/src/components/DriverCard.js new file mode 100644 index 0000000..63e0e6c --- /dev/null +++ b/src/components/DriverCard.js @@ -0,0 +1,18 @@ +import React from 'react'; +import './DriverCard.css'; +import Rating from './Rating'; + +const DriverCard = ({ name, rating, img, car }) => { + return ( +
+ {name} +
+

{name}

+ {rating} {/* Pass the prop to indicate it's within DriverCard */} +

{car.model} - {car.licensePlate}

+
+
+ ); +}; + +export default DriverCard; \ No newline at end of file diff --git a/src/components/Greetings.css b/src/components/Greetings.css new file mode 100644 index 0000000..1201755 --- /dev/null +++ b/src/components/Greetings.css @@ -0,0 +1,7 @@ +.greetings { + font-size: 35px; + text-align: left; + border: 2px solid black; + margin: 10px 10px; + padding: 6px 4px; +} \ No newline at end of file diff --git a/src/components/Greetings.js b/src/components/Greetings.js new file mode 100644 index 0000000..4ff426a --- /dev/null +++ b/src/components/Greetings.js @@ -0,0 +1,25 @@ +import React from 'react'; +import './Greetings.css'; + +function Greetings(props) { + const { lang, children } = props; + + // Map language codes to greetings + const greetings = { + de: 'Hallo', + en: 'Hello', + es: 'Hola', + fr: 'Bonjour', + }; + + // Get the appropriate greeting based on the lang prop + const greetingText = greetings[lang] || 'Hello'; // Default to 'Hello' if lang is not recognized + + return ( +
+ {greetingText} {children} +
+ ); +} + +export default Greetings; \ No newline at end of file diff --git a/src/components/IdCard.css b/src/components/IdCard.css new file mode 100644 index 0000000..baa07bc --- /dev/null +++ b/src/components/IdCard.css @@ -0,0 +1,24 @@ +.id-card { + display: flex; + align-items: center; + border: 2px solid black; + padding: 3px 7px; + margin: 10px 10px; +} + +.id-card img { + margin-right: 20px; + padding-top: 5px; + padding-bottom: 5px; +} + +.id-card-details { + margin-top: -30px; /* Apply the negative margin to the container */ +} + +.id-card-details p { + margin-left: -15px; + text-align: left; + line-height: 5px; + font-weight:500 +} \ No newline at end of file diff --git a/src/components/IdCard.js b/src/components/IdCard.js new file mode 100644 index 0000000..bc88353 --- /dev/null +++ b/src/components/IdCard.js @@ -0,0 +1,24 @@ +import React from 'react'; +import './IdCard.css'; + +function IdCard(props) { + const { lastName, firstName, gender, height, birth, picture } = props; + + // Format the birth date without timezone restrictions and remove commas + let formattedBirthDate = birth.toDateString().replace(/,/g, ''); // Format and remove commas + + return ( +
+ {`${firstName} +
+

First name: {firstName}

+

Last name: {lastName}

+

Gender: {gender}

+

Height: {(height / 100).toFixed(2)} m

+

Birth: {formattedBirthDate}

+
+
+ ); +} + +export default IdCard; \ No newline at end of file diff --git a/src/components/LikeButton.css b/src/components/LikeButton.css new file mode 100644 index 0000000..b211b54 --- /dev/null +++ b/src/components/LikeButton.css @@ -0,0 +1,13 @@ +.like-button { + padding: 10px 20px; + margin-right: 10px; + font-size: 18px; + color: white; + border: none; + cursor: pointer; + transition: background-color 0.3s ease; + } + + .like-button:hover { + opacity: 0.8; + } \ No newline at end of file diff --git a/src/components/LikeButton.js b/src/components/LikeButton.js new file mode 100644 index 0000000..89406b6 --- /dev/null +++ b/src/components/LikeButton.js @@ -0,0 +1,26 @@ +import React, { useState } from 'react'; +import './LikeButton.css'; + +const LikeButton = () => { + const [likes, setLikes] = useState(0); + const [colorIndex, setColorIndex] = useState(0); + + const colors = ['purple', 'blue', 'green', 'yellow', 'orange', 'red']; + + const handleClick = () => { + setLikes(likes + 1); + setColorIndex((colorIndex + 1) % colors.length); + }; + + return ( + + ); +}; + +export default LikeButton; \ No newline at end of file diff --git a/src/components/NumbersTable.css b/src/components/NumbersTable.css new file mode 100644 index 0000000..bd1c98d --- /dev/null +++ b/src/components/NumbersTable.css @@ -0,0 +1,25 @@ +.numbers-table { + display: grid; + grid-template-columns: repeat(5, 52px); /* 5 columns */ + grid-template-rows: repeat(3, 52px); /* 3 rows */ + gap: 0px; /* Space between numbers */ +} + +.number { + width: 50px; + height: 50px; + display: flex; + align-items: center; + justify-content: center; + border: 2px solid black; + font-size: 18px; + font-weight: 500; +} + +.even { + background-color: red; +} + +.odd { + color: black; +} \ No newline at end of file diff --git a/src/components/NumbersTable.js b/src/components/NumbersTable.js new file mode 100644 index 0000000..e3c9bb7 --- /dev/null +++ b/src/components/NumbersTable.js @@ -0,0 +1,21 @@ +import React from 'react'; +import './NumbersTable.css'; // Make sure to create and import this CSS file + +const NumbersTable = ({ limit }) => { + const numbers = Array.from({ length: limit }, (_, i) => i + 1); + + return ( +
+ {numbers.map((number) => ( +
+ {number} +
+ ))} +
+ ); +}; + +export default NumbersTable; \ No newline at end of file diff --git a/src/components/RGBColorPicker.js b/src/components/RGBColorPicker.js new file mode 100644 index 0000000..d47351d --- /dev/null +++ b/src/components/RGBColorPicker.js @@ -0,0 +1,73 @@ +import React, { useState } from 'react'; +import SingleColorPicker from './SingleColorPicker'; + +const RGBColorPicker = () => { + const [rValue, setRValue] = useState(0); + const [gValue, setGValue] = useState(0); + const [bValue, setBValue] = useState(0); + + return ( +
+
+ setRValue(Number(value))} + /> + setGValue(Number(value))} + /> + setBValue(Number(value))} + /> +
+ +
+
+
+ rgb({rValue},{gValue},{bValue}) +
+
+
+ ); +}; + +const styles = { + container: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + justifyContent: 'center', + paddingTop: '100px', + }, + pickersContainer: { + display: 'flex', + flexDirection: 'column', + alignItems: 'center', + marginBottom: '20px', + }, + colorAndText: { + display: 'flex', + alignItems: 'center', + }, +}; + +export default RGBColorPicker; \ No newline at end of file diff --git a/src/components/Random.css b/src/components/Random.css new file mode 100644 index 0000000..a16655a --- /dev/null +++ b/src/components/Random.css @@ -0,0 +1,8 @@ +.random +{ + font-size: 35px; + text-align: left; + border: 2px solid black; + margin: 10px 10px; + padding: 6px 4px; +} diff --git a/src/components/Random.js b/src/components/Random.js new file mode 100644 index 0000000..9a1f537 --- /dev/null +++ b/src/components/Random.js @@ -0,0 +1,18 @@ +import React from 'react'; +import './Rating.css'; + +const Rating = ({ children, isDriverCard }) => { + const roundedRating = Math.round(children); + const stars = '★'.repeat(roundedRating) + '☆'.repeat(5 - roundedRating); + + const textColor = isDriverCard ? 'white' : 'black'; // Conditionally set the text color + const textAlign = isDriverCard ? 'left' : 'center'; // Conditionally set the text-align + + return ( +
+ {stars} +
+ ); +}; + +export default Rating; \ No newline at end of file diff --git a/src/components/Rating.css b/src/components/Rating.css new file mode 100644 index 0000000..45bbe5f --- /dev/null +++ b/src/components/Rating.css @@ -0,0 +1,5 @@ +.rating { + font-size: 24px; /* Adjust the size of the stars */ + color: black; /* Color for the filled stars */ + } + diff --git a/src/components/Rating.js b/src/components/Rating.js new file mode 100644 index 0000000..b590053 --- /dev/null +++ b/src/components/Rating.js @@ -0,0 +1,18 @@ +import React from 'react'; +import './Rating.css'; + +const Rating = ({ children, isDriverCard }) => { + const roundedRating = Math.round(children); + const stars = '★'.repeat(roundedRating) + '☆'.repeat(5 - roundedRating); + + const textColor = isDriverCard ? 'white' : 'black'; // Conditionally set the text color + const textAlign = isDriverCard ? 'left' : 'center'; // Conditionally set the text-align + + return ( +
+ {stars} +
+ ); +}; + +export default Rating; \ No newline at end of file diff --git a/src/components/SingleColorPicker.js b/src/components/SingleColorPicker.js new file mode 100644 index 0000000..5554bb8 --- /dev/null +++ b/src/components/SingleColorPicker.js @@ -0,0 +1,46 @@ +import React from 'react'; + +const SingleColorPicker = ({ color, value, onChange }) => { + const handleInputChange = (e) => { + onChange(e.target.value); + }; + + const getColorLabel = (color) => { + switch (color) { + case 'r': + return 'R:'; + case 'g': + return 'G:'; + case 'b': + return 'B:'; + default: + return ''; + } + }; + + return ( +
+
+ + +
+ ); +}; + +export default SingleColorPicker;