-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWeatherInfo.js
More file actions
37 lines (35 loc) · 1.03 KB
/
WeatherInfo.js
File metadata and controls
37 lines (35 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import React from "react";
import FormattedDate from "./FormattedDate";
import WeatherIcon from "./WeatherIcon";
import WeatherTemperature from "./WeatherTemperature";
export default function WeatherInfo(props) {
return (
<div className="WeatherInfo">
<h1>{props.data.city}</h1>
<ul>
<li>
<FormattedDate date={props.data.date} />
</li>
<li className="text-capitalize">{props.data.description}</li>
</ul>
<div className="row mt-3">
<div className="col-6">
<div className="d-flex">
<div>
<WeatherIcon code={props.data.icon} size={52} />
</div>
<div>
<WeatherTemperature celsius={props.data.temperature} />
</div>
</div>
</div>
<div className="col-6">
<ul>
<li>Humidity: {props.data.humidity}%</li>
<li>Wind: {props.data.wind} km/h</li>
</ul>
</div>
</div>
</div>
);
}