Files
optolith-client/js/views/attributes/AttributeList.js
T
Lukas Obermann e1927227bf Changed data objects to ES6 classes
Additionally changed folder structure to components and views
2016-11-14 00:18:09 +01:00

28 lines
596 B
JavaScript

import AttributeListItem from './AttributeListItem';
import React, { Component, PropTypes } from 'react';
class AttributeList extends Component {
static propTypes = {
attributes: PropTypes.array.isRequired,
max: PropTypes.number.isRequired,
phase: PropTypes.number.isRequired,
sumMax: PropTypes.bool.isRequired
};
render() {
const { attributes, ...other } = this.props;
return (
<div className="main">
{
attributes.map(attribute => <AttributeListItem {...other} key={attribute.id} attribute={attribute} />)
}
</div>
);
}
}
export default AttributeList;