-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathFileList.js
More file actions
35 lines (31 loc) · 776 Bytes
/
FileList.js
File metadata and controls
35 lines (31 loc) · 776 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
27
28
29
30
31
32
33
34
import React, { Component } from "react";
import PropTypes from "prop-types";
import { Table } from "reactstrap";
import FileRow from "./FileRow";
class FileList extends Component {
render() {
const { files = [], removeFile } = this.props;
return (
<Table striped>
<thead>
<tr>
<th>File Name</th>
<th>File Type</th>
<th>IPFS Hash</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{files.map((file, index) => (
<FileRow key={index} file={file} removeFile={removeFile} />
))}
</tbody>
</Table>
);
}
}
FileList.propTypes = {
files: PropTypes.array,
removeFile: PropTypes.func.isRequired,
};
export default FileList;