1 | import * as React from 'react';
|
2 | import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
3 |
|
4 | export interface CardMediaTypeMap<P, D extends React.ElementType> {
|
5 | props: P & {
|
6 | /**
|
7 | * The content of the component.
|
8 | */
|
9 | children?: React.ReactNode;
|
10 | /**
|
11 | * Image to be displayed as a background image.
|
12 | * Either `image` or `src` prop must be specified.
|
13 | * Note that caller must specify height otherwise the image will not be visible.
|
14 | */
|
15 | image?: string;
|
16 | /**
|
17 | * An alias for `image` property.
|
18 | * Available only with media components.
|
19 | * Media components: `video`, `audio`, `picture`, `iframe`, `img`.
|
20 | */
|
21 | src?: string;
|
22 | };
|
23 | defaultComponent: D;
|
24 | classKey: CardMediaClassKey;
|
25 | }
|
26 |
|
27 | /**
|
28 | *
|
29 | * Demos:
|
30 | *
|
31 | * - [Cards](https://material-ui.com/components/cards/)
|
32 | *
|
33 | * API:
|
34 | *
|
35 | * - [CardMedia API](https://material-ui.com/api/card-media/)
|
36 | */
|
37 | declare const CardMedia: OverridableComponent<CardMediaTypeMap<{}, 'div'>>;
|
38 |
|
39 | export type CardMediaClassKey = 'root' | 'media';
|
40 |
|
41 | export type CardMediaProps<D extends React.ElementType = 'div', P = {}> = OverrideProps<
|
42 | CardMediaTypeMap<P, D>,
|
43 | D
|
44 | >;
|
45 |
|
46 | export default CardMedia;
|