-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExplanations.jsx
31 lines (30 loc) · 1.07 KB
/
Explanations.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import React from "react";
import ReactDOM from "react-dom";
import Explanation from "./Explanation.jsx";
export default class Explanations extends React.Component {
render() {
var elts = [];
for (var item of this.props.data) {
var index = elts.length;
if (index) {
elts.push(<hr key={"separator" + index} className="explanations__separator" />);
}
elts.push(
<Explanation key={"explanation" + index}
name={item.name}
description={item.description}
items={item.items}
matcherForItems={item.matcherForItems}
items2={item.items2}
matcherForItems2={item.matcherForItems2}
marks={this.props.marks}
cite={item.cite} />
);
}
return (
<div className="explanations">
{elts}
</div>
);
}
}