@uimkit/uikit-react
Version:
<img style="width:64px" src="https://mgmt.uimkit.chat/media/img/avatar.png"/>
41 lines (38 loc) • 1.68 kB
TypeScript
import React__default from 'react';
import { UIContactPreviewComponentProps } from '../UIContactPreview/UIContactPreview.js';
import { VirtuosoProps, ScrollSeekConfiguration, ScrollSeekPlaceholderProps } from 'react-virtuoso';
import { UnknownType } from '../../types/index.js';
import { Contact } from '../../types/models.js';
type UIContactListProps = {
/** 传递给 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>;
};
Preview?: React__default.ComponentType<UIContactPreviewComponentProps>;
/** 自定义列表头部 */
head?: React__default.ReactElement;
activeContact?: Contact;
setActiveContact?: (contact: Contact) => void;
};
type UIContactListWithContextProps = UIContactListProps & {
hasMore: boolean;
loading: boolean;
loadMore: () => void;
contacts: Contact[];
};
declare const UIContactList: React__default.FC<UIContactListProps>;
export { UIContactList, UIContactListProps, UIContactListWithContextProps };
//# sourceMappingURL=UIContactList.d.ts.map