// @flow import * as React from 'react'; import {View} from 'react-native'; import {withTheme} from 'react-native-paper'; import Grid from "./Grid"; type Props = { next: Object, } class Preview extends React.PureComponent { colors: Object; constructor(props) { super(props); this.colors = props.theme.colors; } getGrids() { let grids = []; for (let i = 0; i < this.props.next.length; i++) { grids.push( ); } return grids; } render() { if (this.props.next.length > 0) { return ( {this.getGrids()} ); } else return null; } } export default withTheme(Preview);