mirror of
https://github.com/bendtherules/buildit-weather-app.git
synced 2026-08-18 13:42:14 +00:00
Add SingleDayForecast
This commit is contained in:
@@ -0,0 +1,21 @@
|
|||||||
|
.WeatherApp {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.WeatherApp-header {
|
||||||
|
background-color: #222;
|
||||||
|
color: white;
|
||||||
|
|
||||||
|
width: 100%;
|
||||||
|
height: 10vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.WeatherApp-title {
|
||||||
|
padding: 3.5vh 0;
|
||||||
|
font-size: 3vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.WeatherApp-body {
|
||||||
|
width: 100%;
|
||||||
|
height: 90vh;
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import * as React from 'react';
|
||||||
|
import './Component.css';
|
||||||
|
import { ForecaseAtInstance } from '../WeatherApp';
|
||||||
|
|
||||||
|
export interface SingleDayForecastProps {
|
||||||
|
forecastDay: Array<ForecaseAtInstance>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class SingleDayForecast extends React.Component<SingleDayForecastProps, {}> {
|
||||||
|
|
||||||
|
constructor(props: SingleDayForecastProps) {
|
||||||
|
super(props);
|
||||||
|
|
||||||
|
this.props = props;
|
||||||
|
|
||||||
|
// this.state = { data: undefined };
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillUpdate(nextProps: SingleDayForecastProps) {
|
||||||
|
this.props = this.props;
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div className="SingleDayForecast">
|
||||||
|
{JSON.stringify(this.props)};
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
export { SingleDayForecast } from './Component';
|
||||||
Reference in New Issue
Block a user