UNPKG

1.09 kBTypeScriptView Raw
1import * as React from 'react';
2import { OverridableComponent, OverrideProps } from '../OverridableComponent';
3
4export interface ImageListItemTypeMap<P = {}, D extends React.ElementType = 'li'> {
5 props: P & {
6 /**
7 * While you can pass any node as children, the main use case is for an img.
8 */
9 children?: React.ReactNode;
10 /**
11 * Width of the item in number of grid columns.
12 */
13 cols?: number;
14 /**
15 * Height of the item in number of grid rows.
16 */
17 rows?: number;
18 };
19 defaultComponent: D;
20 classKey: ImageListItemClassKey;
21}
22/**
23 *
24 * Demos:
25 *
26 * - [Image List](https://mui.com/components/image-list/)
27 *
28 * API:
29 *
30 * - [ImageListItem API](https://mui.com/api/image-list-item/)
31 */
32declare const ImageListItem: OverridableComponent<ImageListItemTypeMap>;
33
34export type ImageListItemClassKey = 'root' | 'item' | 'imgFullHeight' | 'imgFullWidth';
35
36export type ImageListItemProps<
37 D extends React.ElementType = ImageListItemTypeMap['defaultComponent'],
38 P = {}
39> = OverrideProps<ImageListItemTypeMap<P, D>, D>;
40
41export default ImageListItem;