import React, { type FunctionComponent, memo, type ReactNode } from "react"; import { ScrollView, View, type ViewStyle } from "react-native"; import { Cell, Table, TableWrapper } from "react-native-reanimated-table"; type MDTableProps = { header: ReactNode[][]; rows: ReactNode[][][]; widthArr: number[]; rowStyle?: ViewStyle; cellStyle?: ViewStyle; borderColor?: string; borderWidth?: number; tableStyle?: ViewStyle; }; const MDTable: FunctionComponent = ({ header, rows, widthArr, cellStyle, rowStyle, tableStyle, borderColor, borderWidth, }) => { return ( {header.map((headerCol, index) => { return ( {headerCol}} /> ); })} {rows.map((rowData, index) => { return ( {rowData.map((cellData, cellIndex) => { return ( {cellData}} /> ); })} ); })}
); }; export default memo(MDTable);