plane hugo

This commit is contained in:
Nilstrieb 2021-02-13 17:53:47 +01:00
parent ec7929a9ba
commit ea8fe969a4
7 changed files with 190 additions and 131 deletions

30
src/Plane.js Normal file
View file

@ -0,0 +1,30 @@
import React, {Component} from "react";
import './Plane.css'
class ModelImage extends Component {
constructor(props) {
super(props);
this.state = {
img: '',
name: '',
}
}
static getDerivedStateFromProps(props) {
return {img: props.img, name: props.name};
}
render() {
return (
<a href="" className="model">
<img src={this.state.img} alt={this.state.name}/>
<div className="model-info">
<span className="model-info-text">{this.state.name}</span>
</div>
</a>
);
}
}
export default ModelImage;