Files
ballistic-builder/Example Code/Weather/index.js

38 lines
760 B
JavaScript
Raw Normal View History

2024-11-14 17:46:13 -05:00
import React from "react";
import styles from "./styles.module.css";
class Weather extends React.Component {
constructor(props) {
super(props);
this.state = {
show: true,
};
this.props = {
name : '',
temperature : '',
temperatureUnit : '',
detailedForecast : '',
}
}
render() {
return (
<div className="card">
<span
className="close"
onClick={this.props.dataclick}
datatitle={this.props.title}
>&times;
</span>
<p>{this.props.name}</p>
<p>{this.props.temperature}</p>
<p>{this.props.temperatureUnit}</p>
<p>{this.props.detailedForecast}</p>
</div>
);
}
}
export default Weather;