diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index a11777c..0000000 Binary files a/public/favicon.ico and /dev/null differ diff --git a/public/logo192.png b/public/logo192.png deleted file mode 100644 index fc44b0a..0000000 Binary files a/public/logo192.png and /dev/null differ diff --git a/public/logo512.png b/public/logo512.png deleted file mode 100644 index a4e47a6..0000000 Binary files a/public/logo512.png and /dev/null differ diff --git a/src/App.css b/src/App.css index e69de29..83d7f19 100644 --- a/src/App.css +++ b/src/App.css @@ -0,0 +1,66 @@ +*{ + margin:0; + padding: 0; + box-sizing: border-box; +} + +.main{ + height: 100vh; + background-color: black; + color: white; + display: flex; + justify-content: center; + align-items: center; +} +.container{ + height: 500px; + width: 500px; + box-shadow: 0px 0px 15px rgb(242, 215, 10); + border-radius: 50px; + text-align: center; + +} +h1{ + margin-top: 10px; +} +.inp{ + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} +input{ + margin-top: 20px; + height: 50px; + width: 200px; + text-align: center; + border-radius: 10px; + border: 2px solid gold; +} +p{ + margin-top: 15px; + color: white; + text-align: center; + +} +button{ +margin-top: 20px; +height: 50px; +width: 200px; +text-align: center; +border-radius: 10px; +border: 2px solid gold; +} +.ans{ + margin-top: 20px; + height: 40px; + width: 130px; + text-align: center; + border-radius: 10px; + border: 2px solid gold; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + font-size: 1.25rem; +} \ No newline at end of file diff --git a/src/App.js b/src/App.js index 93624ea..96a9c4c 100644 --- a/src/App.js +++ b/src/App.js @@ -1,9 +1,35 @@ import "./App.css"; +import {useState} from 'react' function App() { + const [weight,setWeight] = useState(0); + const [height,setHeight] = useState(0); + const [name,setName] = useState(''); + const [bmi,setBMI] = useState(0); + +function calc(){ + + setBMI(Math.round(weight/(height*height))); + +} + return ( -
-

Hello World

+
+
+

BMI Calculator

+
{ + setName(e.target.value);}} placeholder="Enter your Name"/> + { + setWeight(+e.target.value); + }} placeholder="Enter your Weight"/> + { + setHeight(+e.target.value);}} placeholder="Enter your Height"/> + +

your Name is {name}, your weight is {weight}kg, your height is {height}m

+

and Your BMI is

+
{bmi}
+
+
); }