1.0.11 • Published 2 years ago

react-mobile-waterfall v1.0.11

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

paramstypedecvalue
listArray<string | {}>list item[]
columnnumbercolumn2,3
WaterfallItemfunclist item component
1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago