dynamic-grid-layout
v1.0.2
Published
A dynamic grid layout, inspiration from Pinterest
Downloads
2
Readme
dynamic-grid-layout
A dynamic grid layout, inspiration from Pinterest
Install
npm install --save dynamic-grid-layout
Usage
import React, { Component } from 'react'
import { GridView } from 'dynamic-grid-layout'
import 'dynamic-grid-layout/dist/index.css'
const Item = ({ item }: any) => <p>{item}</p>
const Example = () => {
const items = ['item1', 'item2']
return (
<GridView
items={items}
renderItem={(item: any) => <Item item={item}></Item>}
/>
)
}