1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 01:39:36 +01:00
onion/js/components/ascribe_detail/history_iterator.js
2015-08-20 15:50:30 +02:00

34 lines
876 B
JavaScript

'use strict';
import React from 'react';
import Form from '../ascribe_forms/form';
import Property from '../ascribe_forms/property';
let HistoryIterator = React.createClass({
propTypes: {
history: React.PropTypes.array
},
render() {
return (
<Form>
{this.props.history.map((historicalEvent, i) => {
return (
<Property
name={i}
key={i}
label={ historicalEvent[0] }
editable={false}>
<pre className="ascribe-pre">{ historicalEvent[1] }</pre>
</Property>
);
})}
<hr />
</Form>
);
}
});
export default HistoryIterator;