1 | import * as React from 'react';
|
2 | import type { RowProps } from '../grid';
|
3 | import type { PaginationConfig } from '../pagination';
|
4 | import type { SpinProps } from '../spin';
|
5 | export type { ListItemMetaProps, ListItemProps } from './Item';
|
6 | export type { ListConsumerProps } from './context';
|
7 | export type ColumnCount = number;
|
8 | export type ColumnType = 'gutter' | 'column' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
9 | export interface ListGridType {
|
10 | gutter?: RowProps['gutter'];
|
11 | column?: ColumnCount;
|
12 | xs?: ColumnCount;
|
13 | sm?: ColumnCount;
|
14 | md?: ColumnCount;
|
15 | lg?: ColumnCount;
|
16 | xl?: ColumnCount;
|
17 | xxl?: ColumnCount;
|
18 | }
|
19 | export type ListSize = 'small' | 'default' | 'large';
|
20 | export type ListItemLayout = 'horizontal' | 'vertical';
|
21 | export interface ListProps<T> {
|
22 | bordered?: boolean;
|
23 | className?: string;
|
24 | rootClassName?: string;
|
25 | style?: React.CSSProperties;
|
26 | children?: React.ReactNode;
|
27 | dataSource?: T[];
|
28 | extra?: React.ReactNode;
|
29 | grid?: ListGridType;
|
30 | id?: string;
|
31 | itemLayout?: ListItemLayout;
|
32 | loading?: boolean | SpinProps;
|
33 | loadMore?: React.ReactNode;
|
34 | pagination?: PaginationConfig | false;
|
35 | prefixCls?: string;
|
36 | rowKey?: ((item: T) => React.Key) | keyof T;
|
37 | renderItem?: (item: T, index: number) => React.ReactNode;
|
38 | size?: ListSize;
|
39 | split?: boolean;
|
40 | header?: React.ReactNode;
|
41 | footer?: React.ReactNode;
|
42 | locale?: ListLocale;
|
43 | }
|
44 | export interface ListLocale {
|
45 | emptyText: React.ReactNode;
|
46 | }
|
47 | declare function List<T>({ pagination, prefixCls: customizePrefixCls, bordered, split, className, rootClassName, style, children, itemLayout, loadMore, grid, dataSource, size: customizeSize, header, footer, loading, rowKey, renderItem, locale, ...rest }: ListProps<T>): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
48 | declare namespace List {
|
49 | var displayName: string;
|
50 | var Item: import("./Item").ListItemTypeProps;
|
51 | }
|
52 | export default List;
|