UNPKG

1.57 kBTypeScriptView Raw
1import * as React from 'react';
2import { SxProps } from '@mui/system';
3import { Theme } from '..';
4import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5import { ImageListItemClasses } from './imageListItemClasses';
6
7export interface ImageListItemOwnProps {
8 /**
9 * The content of the component, normally an `<img>`.
10 */
11 children?: React.ReactNode;
12 /**
13 * Override or extend the styles applied to the component.
14 */
15 classes?: Partial<ImageListItemClasses>;
16 /**
17 * Width of the item in number of grid columns.
18 * @default 1
19 */
20 cols?: number;
21 /**
22 * Height of the item in number of grid rows.
23 * @default 1
24 */
25 rows?: number;
26 /**
27 * The system prop that allows defining system overrides as well as additional CSS styles.
28 */
29 sx?: SxProps<Theme>;
30}
31
32export interface ImageListItemTypeMap<
33 AdditionalProps = {},
34 RootComponent extends React.ElementType = 'li',
35> {
36 props: AdditionalProps & ImageListItemOwnProps;
37 defaultComponent: RootComponent;
38}
39/**
40 *
41 * Demos:
42 *
43 * - [Image List](https://mui.com/material-ui/react-image-list/)
44 *
45 * API:
46 *
47 * - [ImageListItem API](https://mui.com/material-ui/api/image-list-item/)
48 */
49declare const ImageListItem: OverridableComponent<ImageListItemTypeMap>;
50
51export type ImageListItemProps<
52 RootComponent extends React.ElementType = ImageListItemTypeMap['defaultComponent'],
53 AdditionalProps = {},
54> = OverrideProps<ImageListItemTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
55 component?: React.ElementType;
56};
57
58export default ImageListItem;