@nutui/nutui-react
Version:
京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序
31 lines (30 loc) • 716 B
TypeScript
import { default as React, FunctionComponent } from 'react';
import { BasicComponent } from '../../utils/typings';
export interface StickyProps extends BasicComponent {
/**
* 容器的 ref
* @default -
*/
container: React.RefObject<HTMLElement>
/**
* 吸附位置
* @default top
*/
position: 'top' | 'bottom'
/**
* 距离,当 position 为 top 时,设置的是 top
* @default 0
*/
threshold: number
/**
* 吸附时的层级
* @default 2000
*/
zIndex: number
/**
* 吸附状态改变时触发
* @default -
*/
onChange: (val: boolean) => void
}
export declare const Sticky: FunctionComponent<Partial<StickyProps>>;