-
-
Notifications
You must be signed in to change notification settings - Fork 503
Expand file tree
/
Copy pathModulesList.jsx
More file actions
26 lines (23 loc) · 777 Bytes
/
ModulesList.jsx
File metadata and controls
26 lines (23 loc) · 777 Bytes
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
import cls from "classnames";
import PureComponent from "../lib/PureComponent.jsx";
import ModuleItem from "./ModuleItem.jsx";
import * as styles from "./ModulesList.css";
export default class ModulesList extends PureComponent {
render({ modules, showSize, highlightedText, isModuleVisible, className }) {
return (
<div className={cls(styles.container, className)}>
{modules.map((module) => (
<ModuleItem
key={module.cid}
module={module}
showSize={showSize}
highlightedText={highlightedText}
isVisible={isModuleVisible}
onClick={this.handleModuleClick}
/>
))}
</div>
);
}
handleModuleClick = (module) => this.props.onModuleClick(module);
}