UNPKG

1.32 kBTypeScriptView Raw
1import * as React from 'react';
2import { OverridableComponent, OverrideProps } from '../OverridableComponent';
3
4export interface ImageListTypeMap<P = {}, D extends React.ElementType = 'ul'> {
5 props: P & {
6 /**
7 * Cell height in `px`.
8 * Set to `'auto'` to let the children determine the height.
9 * @deprecated Use rowHeight instead.
10 */
11 cellHeight?: number | 'auto';
12 /**
13 * Items that will be in the image list.
14 */
15 children?: React.ReactNode;
16 /**
17 * Number of columns.
18 */
19 cols?: number;
20 /**
21 * The gap between items in `px`.
22 */
23 gap?: number;
24 /**
25 * The height of one row in `px`.
26 */
27 rowHeight?: number | 'auto';
28 /**
29 * The spacing between items in `px`.
30 * @deprecated Use gap instead.
31 */
32 spacing?: number;
33 };
34 defaultComponent: D;
35 classKey: ImageListClassKey;
36}
37/**
38 *
39 * Demos:
40 *
41 * - [Image List](https://mui.com/components/image-list/)
42 *
43 * API:
44 *
45 * - [ImageList API](https://mui.com/api/image-list/)
46 */
47declare const ImageList: OverridableComponent<ImageListTypeMap>;
48
49export type ImageListClassKey = 'root';
50
51export type ImageListProps<
52 D extends React.ElementType = ImageListTypeMap['defaultComponent'],
53 P = {}
54> = OverrideProps<ImageListTypeMap<P, D>, D>;
55
56export default ImageList;