3.4.1 • Published 4 years ago
react-native-grid-configurable v3.4.1
Yet another grid for react native
Usage
yarn add react-native-grid-configurable
then
<Grid
cols={1}
height={70}
imgSrcs={[src1, src2, s3, s4, s5]}
titles={['A loo oo ooo ooo ooo ooo ooo ong book name','bb','bb','bb','bb']}
paddingBetweenRows={16}>
Options
- cols: How many grids a row have
- height: The height(pixels) of the picture row, and the width & height of the
<img>
tag - imgSrcs:
['url1', 'url2', 'url3']
- titles:
['title1', 'title2', 'title3']
- paddingBetweenRows: Padding(pixels) between rows, default is 0
- callbacks:
[() => {console.log('Callback of first image')}]
On different containers
Narrow
Wide
Examples
Plese check the sample folder to run the examples.
cols: 3, height: 90, paddingBetweenRows: 16, imgSrcs: [...], titles: [...]
cols: 4, height: 70, paddingBetweenRows: 16
cols: 1, height: 70, paddingBetweenRows: 16