blob: 5fc6599e11fee5ddb91d0e1e76e27e498c449cb0 (
plain)
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
|
import React from 'react';
import './index.css';
import classNames from 'classnames';
class ClientBox extends React.Component {
constructor(props) {
super(props);
this.state = {
isImprove: true,
};
}
render() {
let imgSrc = require('image/client-icon/' + this.props.clientNum + '.png');
let std = this.props.std;
let median = this.props.median;
let boxClass = classNames({
'client-box': true,
'improve': median > std,
'decline': (median <= std)
});
return (
<div className={boxClass}>
<img src={imgSrc} alt=""/>
</div>
);
}
}
export default ClientBox;
|