iteration

This commit is contained in:
Ceolter
2016-01-24 12:32:09 +00:00
parent 2283363c38
commit c53f9e4896
5 changed files with 259 additions and 8 deletions

View File

@@ -0,0 +1,21 @@
import React from 'react';
import RefData from './RefData';
export default class SkillsCellRenderer extends React.Component {
render() {
var skills = [];
RefData.IT_SKILLS.forEach( (skill) => {
if (this.props.skills[skill]) {
skills.push(<img key={skill} src={'images/skills/' + skill + '.png'} width={16} title={skill} />);
}
});
return <span>{skills}</span>;
}
}
SkillsCellRenderer.propTypes = {
skills: React.PropTypes.object
};