react-mobile-waterfall

1.0.11 • Public • Published

code

    import Waterfall from 'react-mobile-waterfall'; // component
    import 'react-mobile-waterfall/main.min.css'; // component styles 
    import WaterfallItem from '../../components/Mine/WaterfallItem'; // custom components of list item.
    <Waterfall  list={list} column={2} WaterfallItem={(context) => <WaterfallItem context={context}/>}></Waterfall> // component usage

Support typescript

    1. New file declaration.d.ts or find the. d.ts declaration file
    2. Document content: declare module 'react-mobile-waterfall'

Typescript usage

    <Waterfall list={list} column={2} WaterfallItem={(context: string | {
        [propName :string] :any
    }) => <WaterfallItem context={context}/>}></Waterfall>

params

params type dec value
list Array<string | {}> list item []
column number column 2,3
WaterfallItem func list item component

Readme

Keywords

Package Sidebar

Install

npm i react-mobile-waterfall

Weekly Downloads

1

Version

1.0.11

License

ISC

Unpacked Size

4.04 kB

Total Files

4

Last publish

Collaborators

  • tudaogeziya