@uimkit/uikit-react
Version:
<img style="width:64px" src="https://mgmt.uimkit.chat/media/img/avatar.png"/>
40 lines (37 loc) • 1.57 kB
TypeScript
import React__default from 'react';
import { VirtuosoProps, ScrollSeekConfiguration, ScrollSeekPlaceholderProps } from 'react-virtuoso';
import { UnknownType } from '../../types/index.js';
import { UIMomentProps } from '../UIMoment/types.js';
import { Profile, Moment } from '../../types/models.js';
type UIMomentListProps = {
Moment?: React__default.ComponentType<UIMomentProps>;
/** 传递给 react-virtuoso 的属性 [`react-virtuoso` virtualized list dependency](https://virtuoso.dev/virtuoso-api-reference/) */
additionalVirtuosoProps?: VirtuosoProps<UnknownType, unknown>;
defaultItemHeight?: number;
/**
* 用户快速滚动列表时显示占位符来提高性能:
* ```
* {
* enter: (velocity) => Math.abs(velocity) > 120,
* exit: (velocity) => Math.abs(velocity) < 40,
* change: () => null,
* placeholder: ({index, height})=> <div style={{height: height + "px"}}>{index}</div>,
* }
* ```
*/
scrollSeekPlaceHolder?: ScrollSeekConfiguration & {
placeholder: React__default.ComponentType<ScrollSeekPlaceholderProps>;
};
profile?: Profile;
};
type UIMomentListWithContextProps = UIMomentListProps & {
hasMore: boolean;
loadingMore: boolean;
loadMore: () => void;
moments?: Moment[];
/** 自定义列表头部 */
head?: React__default.ReactElement;
};
declare const UIMomentList: React__default.FC<UIMomentListProps>;
export { UIMomentList, UIMomentListProps, UIMomentListWithContextProps };
//# sourceMappingURL=UIMomentList.d.ts.map