-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTable.js
More file actions
25 lines (22 loc) · 707 Bytes
/
Table.js
File metadata and controls
25 lines (22 loc) · 707 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
import React from 'react';
import { DataTable } from 'react-native-paper';
const Table = ({ columns, data }) =>
{
return (
<DataTable>
<DataTable.Header>
{columns.map((column, index) => (
<DataTable.Title key={index}>{column}</DataTable.Title>
))}
</DataTable.Header>
{data.map((row, rowIndex) => (
<DataTable.Row key={rowIndex}>
{row.map((cell, cellIndex) => (
<DataTable.Cell key={cellIndex}>{cell}</DataTable.Cell>
))}
</DataTable.Row>
))}
</DataTable>
);
};
export default Table;