// @flow import * as React from 'react'; import {View} from 'react-native'; import {withTheme} from 'react-native-paper'; import Cell from "./Cell"; type Props = { navigation: Object, grid: Array>, backgroundColor: string, height: number, width: number, containerHeight: number|string, } class Grid extends React.Component{ colors: Object; constructor(props) { super(props); this.colors = props.theme.colors; } getRow(rowNumber: number) { let cells = []; for (let i = 0; i < this.props.width; i++) { let cell = this.props.grid[rowNumber][i]; let key = rowNumber + ':' + i; cells.push(); } return( {cells} ); } getGrid() { let rows = []; for (let i = 0; i < this.props.height; i++) { rows.push(this.getRow(i)); } return rows; } render() { return ( {this.getGrid()} ); } } export default withTheme(Grid);