1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/public/js/components/log/LogEntryList.jsx

33 lines
940 B
React
Raw Normal View History

2014-11-13 15:14:41 +01:00
var React = require('react'),
2014-11-14 07:29:55 +01:00
LogEntry = require('./LogEntry');
2014-11-13 15:14:41 +01:00
2014-11-14 07:29:55 +01:00
var LogEntryList = React.createClass({
2014-11-13 15:14:41 +01:00
propTypes: {
events: React.PropTypes.array.isRequired
},
render: function() {
2014-11-14 07:29:55 +01:00
var logEntryNodes = this.props.events.map(function(event) {
return <LogEntry event={event} key={event.name} />;
2014-11-13 15:14:41 +01:00
});
return (
<div className='r-margin'>
<table className='outerborder'>
<thead>
<tr>
2014-11-17 10:10:47 +01:00
<th>When</th>
2014-11-13 15:14:41 +01:00
<th>Action</th>
2014-11-17 10:10:47 +01:00
<th>Data</th>
2014-11-13 15:14:41 +01:00
<th>Author</th>
</tr>
</thead>
<tbody>
2014-11-14 07:29:55 +01:00
{logEntryNodes}
2014-11-13 15:14:41 +01:00
</tbody>
</table>
</div>
);
}
});
2014-11-14 07:29:55 +01:00
module.exports = LogEntryList;