import React, { Component } from 'react'; import { View, StyleSheet, StyleProp, TextStyle, ViewStyle } from 'react-native'; import { Cell } from './cell'; import { sum } from '../utils'; type RowProps = { data: any[]; widthArr?: number[]; height?: number; style?: StyleProp; textStyle?: StyleProp; flexArr?: number[]; testID?: string; }; export class Row extends Component { render() { const { data, style, widthArr, height, flexArr, textStyle, testID, ...props } = this.props; let width = widthArr ? sum(widthArr) : 0; return data ? ( {data.map((item, i) => { const flex = flexArr && flexArr[i]; const wth = widthArr && widthArr[i]; return ; })} ) : null; } } type RowsProps = { data: any[]; widthArr: number[]; style: StyleProp; textStyle: StyleProp; flexArr: number[]; heightArr: number[]; testID?: string; }; export class Rows extends Component { render() { const { data, style, widthArr, heightArr, flexArr, textStyle, testID, ...props } = this.props; const flex = flexArr ? sum(flexArr) : 0; const width = widthArr ? sum(widthArr) : 0; return data ? ( {data.map((item, i) => { const height = heightArr && heightArr[i]; return ( ); })} ) : null; } } const styles = StyleSheet.create({ row: { flexDirection: 'row', overflow: 'hidden' } });