edit ui
This commit is contained in:
parent
ecaa1c410e
commit
2d8bb46a73
@ -19,11 +19,13 @@ export default function Home() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.wrapper}>
|
<div className={styles.wrapper}>
|
||||||
<h1>My weather app {input}</h1>
|
{/* <h1>My weather app {input}</h1> */}
|
||||||
<input type="text" onChange={(e) => setInput(e.target.value)} />
|
|
||||||
<button onClick={clickHandler}>Send</button>
|
|
||||||
{weatherData && (
|
{weatherData && (
|
||||||
<>
|
<>
|
||||||
|
<h1>
|
||||||
|
{weatherData.name}, {weatherData.sys.country}
|
||||||
|
</h1>
|
||||||
<p>{weatherData.weather[0].description}</p>
|
<p>{weatherData.weather[0].description}</p>
|
||||||
<Image
|
<Image
|
||||||
alt="weatherIcon"
|
alt="weatherIcon"
|
||||||
@ -32,13 +34,17 @@ export default function Home() {
|
|||||||
width="300px"
|
width="300px"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<p>
|
|
||||||
{weatherData.name}, {weatherData.sys.country}
|
|
||||||
</p>
|
|
||||||
<h1 className={styles.mainTemp}>
|
<h1 className={styles.mainTemp}>
|
||||||
{Math.round(weatherData.main.temp)}°
|
{Math.round(weatherData.main.temp)}°
|
||||||
</h1>
|
</h1>
|
||||||
<p>Feels like {weatherData.main.feels_like}°</p>
|
<p>Feels like {weatherData.main.feels_like}°</p>
|
||||||
|
<input
|
||||||
|
className={styles.search}
|
||||||
|
defaultValue="Search city"
|
||||||
|
type="text"
|
||||||
|
onChange={(e) => setInput(e.target.value)}
|
||||||
|
/>
|
||||||
|
<button onClick={clickHandler}>Send</button>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,8 +3,19 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
/* border: 1px solid grey; */
|
/* border: 1px solid grey; */
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
padding: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mainTemp {
|
.mainTemp {
|
||||||
font-size: 84px;
|
font-size: 84px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.search {
|
||||||
|
margin-top: 300px;
|
||||||
|
height: 30px;
|
||||||
|
width: 200px;
|
||||||
|
border-radius: 10px;
|
||||||
|
border: none;
|
||||||
|
color: rgb(224, 237, 241);
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user