Add SingleDayForecast

This commit is contained in:
2018-04-01 13:17:31 +05:30
parent 0cd6a25e2f
commit 6aca76ed03
3 changed files with 52 additions and 0 deletions
@@ -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';