dzh-react-sticky

1.0.0 • Public • Published

dzh-react-sticky

React中固钉(粘性布局)组件实现

Prop Types

Property Type Required? Description
contentHeight Number 被固钉组件包裹起来的内容高度

How To Use

import React, { Component } from 'react'
import { Sticky } from 'dzh-react-sticky'
 
class Example extends Component {
    render()(
      return <div>
        ...
        <Sticky contentHeight={40}>
         {% 被固钉组件包裹起来的子组件 %}
         <Filter />
        </Sticky>
        ...
      </div>
    )
}

License

dzh-react-sticky is available under the MIT License.

Package Sidebar

Install

npm i dzh-react-sticky

Weekly Downloads

1

Version

1.0.0

License

ISC

Unpacked Size

3.96 kB

Total Files

7

Last publish

Collaborators

  • duanzihuang