0.1.2 • Published 6 years ago

react-native-simple-grid v0.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

react-native-simple-grid

Easy to use and full customized grid for React Native.

Installation

$ npm install react-native-simple-grid --save

Usage

import Grid from 'react-native-simple-grid';

<Grid
	dataSource={data.data} 
	column={2} 
	rowView={(rowData) => {
	return(
		<View  style={{flex:  1, backgroundColor:  rowData.color}}  >
		<Text>{rowData.name}</Text>
		</View>
	)
	}}
	/>

Properties

PropDescription
dataSourceFor simplicity, dataSource is just a plain array.
columnNumber of column in grid.
rowViewTakes an item from data and renders it into the list.
rowNumber of row show in screen at a time.

other properties are derived from ListView

Example

Wallpaper World

enter image description here