1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 17:45:10 +01:00
onion/js/components/ascribe_detail/history_iterator.js

34 lines
876 B
JavaScript
Raw Normal View History

2015-08-20 15:50:30 +02:00
'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;