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