1 | import * as React from 'react';
|
2 | import { SxProps } from '@mui/system';
|
3 | import { OverridableStringUnion } from '@mui/types';
|
4 | import { Theme } from '../styles';
|
5 | import { OverrideProps, OverridableComponent, OverridableTypeMap } from '../OverridableComponent';
|
6 | import { PaperClasses } from './paperClasses';
|
7 |
|
8 | export interface PaperPropsVariantOverrides {}
|
9 |
|
10 | export interface PaperOwnProps {
|
11 | |
12 |
|
13 |
|
14 | children?: React.ReactNode;
|
15 | |
16 |
|
17 |
|
18 | classes?: Partial<PaperClasses>;
|
19 | |
20 |
|
21 |
|
22 |
|
23 |
|
24 | elevation?: number;
|
25 | |
26 |
|
27 |
|
28 |
|
29 | square?: boolean;
|
30 | |
31 |
|
32 |
|
33 | sx?: SxProps<Theme>;
|
34 | |
35 |
|
36 |
|
37 |
|
38 | variant?: OverridableStringUnion<'elevation' | 'outlined', PaperPropsVariantOverrides>;
|
39 | }
|
40 |
|
41 | export interface PaperTypeMap<
|
42 | AdditionalProps = {},
|
43 | RootComponent extends React.ElementType = 'div',
|
44 | > {
|
45 | props: AdditionalProps & PaperOwnProps;
|
46 | defaultComponent: RootComponent;
|
47 | }
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | declare const Paper: OverridableComponent<PaperTypeMap>;
|
61 |
|
62 | export interface ExtendPaperTypeMap<TypeMap extends OverridableTypeMap, Keys extends string = ''> {
|
63 | props: TypeMap['props'] & Omit<PaperTypeMap['props'], Keys>;
|
64 | defaultComponent: TypeMap['defaultComponent'];
|
65 | }
|
66 |
|
67 | export type PaperProps<
|
68 | RootComponent extends React.ElementType = PaperTypeMap['defaultComponent'],
|
69 | AdditionalProps = {},
|
70 | > = OverrideProps<PaperTypeMap<AdditionalProps, RootComponent>, RootComponent> & {
|
71 | component?: React.ElementType;
|
72 | };
|
73 |
|
74 | export default Paper;
|