28 lines
674 B
JavaScript
28 lines
674 B
JavaScript
var React = require('react');
|
|
|
|
var Traits = React.createClass({
|
|
render: function() {
|
|
|
|
var traitsPresentation = [];
|
|
var traits = (this.props.traits || {});
|
|
for(var traitKey in traits ) {
|
|
if(traits.hasOwnProperty(traitKey)) {
|
|
var traitValue = this.props.traits[traitKey];
|
|
traitsPresentation.push( <div key={traitKey} className="single_trait">{traitKey}: {traitValue}</div> );
|
|
}
|
|
}
|
|
|
|
|
|
return (
|
|
<div className="row-fluid">
|
|
<div className="span12">
|
|
{traitsPresentation}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
});
|
|
|
|
|
|
module.exports = Traits;
|